Add ability to register tools in McpServer
(#35068)
Makes it easier to add tools to a server by implementing a trait Release Notes: - N/A
This commit is contained in:
parent
b446d66be7
commit
15c9da4ea4
4 changed files with 408 additions and 244 deletions
|
@ -2,6 +2,7 @@ mod mcp_server;
|
|||
pub mod tools;
|
||||
|
||||
use collections::HashMap;
|
||||
use context_server::listener::McpServerTool;
|
||||
use project::Project;
|
||||
use settings::SettingsStore;
|
||||
use smol::process::Child;
|
||||
|
@ -332,10 +333,16 @@ async fn spawn_claude(
|
|||
&format!(
|
||||
"mcp__{}__{}",
|
||||
mcp_server::SERVER_NAME,
|
||||
mcp_server::PERMISSION_TOOL
|
||||
mcp_server::PermissionTool::NAME,
|
||||
),
|
||||
"--allowedTools",
|
||||
"mcp__zed__Read,mcp__zed__Edit",
|
||||
&format!(
|
||||
"mcp__{}__{},mcp__{}__{}",
|
||||
mcp_server::SERVER_NAME,
|
||||
mcp_server::EditTool::NAME,
|
||||
mcp_server::SERVER_NAME,
|
||||
mcp_server::ReadTool::NAME
|
||||
),
|
||||
"--disallowedTools",
|
||||
"Read,Edit",
|
||||
])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue