Skip to content

Commit b48bece

Browse files
caseychow-oaicodex
andcommitted
Fix MCP lint regressions
Co-authored-by: Codex <noreply@openai.com>
1 parent 3f800e2 commit b48bece

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

codex-rs/core/src/codex_delegate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
)

codex-rs/core/src/mcp_tool_call.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,18 @@ use std::path::Path;
6060
use std::sync::Arc;
6161
use 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`.
6570
pub(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
)

codex-rs/core/src/tools/handlers/mcp.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use async_trait::async_trait;
22
use std::sync::Arc;
33

44
use crate::function_tool::FunctionCallError;
5+
use crate::mcp_tool_call::QualifiedMcpTool;
56
use crate::mcp_tool_call::handle_mcp_tool_call;
67
use crate::tools::context::ToolInvocation;
78
use 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,

0 commit comments

Comments
 (0)