From 497b25bf4a2ff49c9b8ee19e71aef58dd4ffbf21 Mon Sep 17 00:00:00 2001 From: GuoYu Date: Wed, 18 Nov 2026 20:31:47 +0800 Subject: [PATCH] fix(mcp): say projectPath defaults to the connection's project (#4262) Every MCP tool described projectPath as optional only when one project is open, so agents with several projects open passed it on every call. The description now matches resolve_project: the call's projectPath, then the connection's project (?project= / X-OpenIDEA-Project), then the only open project. Co-authored-by: guoyucode <29471644+guoyucode@users.noreply.github.com> --- crates/ide-host/src/mcp/tool.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ide-host/src/mcp/tool.rs b/crates/ide-host/src/mcp/tool.rs index 3f98ed75c..524d35380 100644 --- a/crates/ide-host/src/mcp/tool.rs +++ b/crates/ide-host/src/mcp/tool.rs @@ -236,7 +236,7 @@ impl Tool { destructive: false, output_schema: None, input_schema: json!({ "type": "object", "properties": { - "projectPath": { "type": "string", "description": "Any directory inside an open project. Optional when only one project is open." } + "projectPath": { "type": "string", "description": "Any directory inside an open project. Defaults to the connection's project (`?project=`) or the only open one." } }, "required": [] }), }, handler: Arc::new(move |call| Box::pin(handler(call))),