core-agent-ide/codex-rs/mcp-server/src
jif-oai d594693d1a
feat: dynamic tools injection (#9539)
## Summary
Add dynamic tool injection to thread startup in API v2, wire dynamic
tool calls through the app server to clients, and plumb responses back
into the model tool pipeline.

### Flow (high level)
- Thread start injects `dynamic_tools` into the model tool list for that
thread (validation is done here).
- When the model emits a tool call for one of those names, core raises a
`DynamicToolCallRequest` event.
- The app server forwards it to the client as `item/tool/call`, waits
for the client’s response, then submits a `DynamicToolResponse` back to
core.
- Core turns that into a `function_call_output` in the next model
request so the model can continue.

### What changed
- Added dynamic tool specs to v2 thread start params and protocol types;
introduced `item/tool/call` (request/response) for dynamic tool
execution.
- Core now registers dynamic tool specs at request time and routes those
calls via a new dynamic tool handler.
- App server validates tool names/schemas, forwards dynamic tool call
requests to clients, and publishes tool outputs back into the session.
- Integration tests
2026-01-26 10:06:44 +00:00
..
tool_handlers remove mcp-server/src/mcp_protocol.rs and the code that depends on it (#2360) 2025-08-18 00:29:18 -07:00
codex_tool_config.rs fix(mcp): include threadId in both content and structuredContent in CallToolResult (#9338) 2026-01-15 18:33:11 -08:00
codex_tool_runner.rs feat: dynamic tools injection (#9539) 2026-01-26 10:06:44 +00:00
error_code.rs fix: update OutgoingMessageSender::send_response() to take Serialize (#2263) 2025-08-13 14:29:13 -07:00
exec_approval.rs feat: add threadId to MCP server messages (#9192) 2026-01-13 22:14:41 -08:00
lib.rs chore: cleanup Config instantiation codepaths (#8226) 2025-12-17 18:01:17 -08:00
main.rs Added new auth-related methods and events to mcp server (#2496) 2025-08-20 20:36:34 -07:00
message_processor.rs fix(mcp): include threadId in both content and structuredContent in CallToolResult (#9338) 2026-01-15 18:33:11 -08:00
outgoing_message.rs feat: ephemeral threads (#9765) 2026-01-24 14:57:40 +00:00
patch_approval.rs feat: add threadId to MCP server messages (#9192) 2026-01-13 22:14:41 -08:00