From f0f3e3f8e151d4554ba4f49b747acb4c129b5649 Mon Sep 17 00:00:00 2001 From: Amine Chioukh Date: Fri, 27 Feb 2026 02:15:47 +0100 Subject: [PATCH] fix: resolve MCP -32601 error by adding templates list handler and io-std feature --- crates/ruvector-cli/Cargo.toml | 2 +- crates/ruvector-cli/src/mcp/handlers.rs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/crates/ruvector-cli/Cargo.toml b/crates/ruvector-cli/Cargo.toml index 668210073..c30695874 100644 --- a/crates/ruvector-cli/Cargo.toml +++ b/crates/ruvector-cli/Cargo.toml @@ -42,7 +42,7 @@ indicatif = { workspace = true } console = { workspace = true } # Async -tokio = { workspace = true } +tokio = { workspace = true, features = ["io-std"] } futures = { workspace = true } # Error handling diff --git a/crates/ruvector-cli/src/mcp/handlers.rs b/crates/ruvector-cli/src/mcp/handlers.rs index 006864fd2..4b02eeeab 100644 --- a/crates/ruvector-cli/src/mcp/handlers.rs +++ b/crates/ruvector-cli/src/mcp/handlers.rs @@ -117,6 +117,14 @@ impl McpHandler { "resources/read" => self.handle_resources_read(request.id, request.params).await, "prompts/list" => self.handle_prompts_list(request.id).await, "prompts/get" => self.handle_prompts_get(request.id, request.params).await, + + "resources/templates/list" => { + let empty_templates = serde_json::json!({ + "resourceTemplates": [] + }); + McpResponse::success(request.id, empty_templates) + }, + _ => McpResponse::error( request.id, McpError::new(error_codes::METHOD_NOT_FOUND, "Method not found"),