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>
This commit is contained in:
GuoYu
2026-11-18 20:31:47 +08:00
committed by GitHub
co-authored by guoyucode
parent 4ecfb98c94
commit 497b25bf4a
+1 -1
View File
@@ -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))),