consciousness-mcp: forward tools/call params directly

Avoid extracting name/args and rebuilding - just forward the params
object as-is to the daemon.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-12 21:17:45 -04:00
commit 5f30bc670e

View file

@ -194,17 +194,8 @@ fn main() {
} }
"tools/call" => { "tools/call" => {
let name = req.params.get("name") // Forward params directly - daemon expects same structure
.and_then(|v| v.as_str()) match client.request("tools/call", Some(req.params.clone())) {
.unwrap_or("");
let args = req.params.get("arguments")
.cloned()
.unwrap_or(json!({}));
match client.request("tools/call", Some(json!({
"name": name,
"arguments": args
}))) {
Ok(result) => respond(req.id, result), Ok(result) => respond(req.id, result),
Err(e) => { Err(e) => {
respond(req.id, json!({ respond(req.id, json!({