File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed
Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -669,7 +669,7 @@ async fn maybe_auto_review_mcp_request_user_input(
669669 parent_session. as_ref ( ) ,
670670 parent_ctx. as_ref ( ) ,
671671 & invocation. tool ,
672- None ,
672+ /*qualified_tool_namespace*/ None ,
673673 & invocation. server ,
674674 & invocation. tool ,
675675 )
Original file line number Diff line number Diff line change @@ -60,14 +60,18 @@ use std::path::Path;
6060use std:: sync:: Arc ;
6161use toml_edit:: value;
6262
63+ pub ( crate ) struct QualifiedMcpTool < ' a > {
64+ pub ( crate ) name : & ' a str ,
65+ pub ( crate ) namespace : Option < & ' a str > ,
66+ }
67+
6368/// Handles the specified tool call dispatches the appropriate
6469/// `McpToolCallBegin` and `McpToolCallEnd` events to the `Session`.
6570pub ( crate ) async fn handle_mcp_tool_call (
6671 sess : Arc < Session > ,
6772 turn_context : & Arc < TurnContext > ,
6873 call_id : String ,
69- qualified_tool_name : & str ,
70- qualified_tool_namespace : Option < & str > ,
74+ qualified_tool : QualifiedMcpTool < ' _ > ,
7175 server : String ,
7276 tool_name : String ,
7377 arguments : String ,
@@ -95,8 +99,8 @@ pub(crate) async fn handle_mcp_tool_call(
9599 let metadata = lookup_mcp_tool_metadata (
96100 sess. as_ref ( ) ,
97101 turn_context. as_ref ( ) ,
98- qualified_tool_name ,
99- qualified_tool_namespace ,
102+ qualified_tool . name ,
103+ qualified_tool . namespace ,
100104 & server,
101105 & tool_name,
102106 )
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ use async_trait::async_trait;
22use std:: sync:: Arc ;
33
44use crate :: function_tool:: FunctionCallError ;
5+ use crate :: mcp_tool_call:: QualifiedMcpTool ;
56use crate :: mcp_tool_call:: handle_mcp_tool_call;
67use crate :: tools:: context:: ToolInvocation ;
78use crate :: tools:: context:: ToolPayload ;
@@ -49,8 +50,10 @@ impl ToolHandler for McpHandler {
4950 Arc :: clone ( & session) ,
5051 & turn,
5152 call_id. clone ( ) ,
52- & tool_name,
53- tool_namespace. as_deref ( ) ,
53+ QualifiedMcpTool {
54+ name : & tool_name,
55+ namespace : tool_namespace. as_deref ( ) ,
56+ } ,
5457 server,
5558 tool,
5659 arguments_str,
You can’t perform that action at this time.
0 commit comments