delete dead code: channel-test, mcp-schema, cmd_mcp_schema
channel-test was a debug tool, mcp-schema was superseded by consciousness-mcp, cmd_mcp_schema in cli/misc.rs was the old poc-memory subcommand. Co-Developed-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
2208e68b4f
commit
61deb7d488
5 changed files with 2 additions and 158 deletions
|
|
@ -1,38 +0,0 @@
|
|||
// mcp-schema — Output MCP tool definitions as JSON
|
||||
//
|
||||
// Claude Code's Python MCP bridge calls this at startup to
|
||||
// discover available tools. The Rust ToolDef definitions are
|
||||
// the source of truth.
|
||||
|
||||
fn main() {
|
||||
use serde_json::json;
|
||||
|
||||
// Map tool names to CLI args + stdin param.
|
||||
let cli_map: std::collections::HashMap<&str, (Vec<&str>, Option<&str>)> = [
|
||||
("memory_render", (vec!["render"], None)),
|
||||
("memory_write", (vec!["write"], Some("content"))),
|
||||
("memory_search", (vec!["graph", "spread"], None)),
|
||||
("memory_links", (vec!["graph", "link"], None)),
|
||||
("memory_link_set", (vec!["graph", "link-set"], None)),
|
||||
("memory_link_add", (vec!["graph", "link-add"], None)),
|
||||
("memory_used", (vec!["used"], None)),
|
||||
("memory_weight_set", (vec!["weight-set"], None)),
|
||||
("memory_rename", (vec!["node", "rename"], None)),
|
||||
("memory_query", (vec!["query"], None)),
|
||||
].into_iter().collect();
|
||||
|
||||
let defs = poc_memory::thought::memory::definitions();
|
||||
let json_out: Vec<_> = defs.iter().filter_map(|d| {
|
||||
let name = &d.function.name;
|
||||
let (cli, stdin_param) = cli_map.get(name.as_str())?;
|
||||
Some(json!({
|
||||
"name": name,
|
||||
"description": d.function.description,
|
||||
"inputSchema": d.function.parameters,
|
||||
"cli": cli,
|
||||
"stdin_param": stdin_param,
|
||||
}))
|
||||
}).collect();
|
||||
|
||||
println!("{}", serde_json::to_string_pretty(&json_out).unwrap());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue