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:
parent
8b808e44af
commit
5f30bc670e
1 changed files with 2 additions and 11 deletions
|
|
@ -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!({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue