Conversation
aibrahim-oai
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
codex-toolsalready owns the shared tool input schema model and parser from the first extraction step, butcore/src/tools/spec.rsstill owned the MCP-specific adapter that normalizesrmcp::model::Toolschemas and wrapsstructuredContentinto the call result output schema.Keeping that adapter in
codex-coremeans the reusable MCP schema path is still split across crates, and the unit tests for that logic stay anchored incodex-coreeven though the runtime orchestration does not need to move yet.This change takes the next small step by moving the reusable MCP schema adapter into
codex-toolswhile leavingResponsesApiToolassembly incodex-core.What changed
tools/src/mcp_tool.rsand siblingtools/src/mcp_tool_tests.rsParsedMcpTool,parse_mcp_tool(), andmcp_call_tool_result_output_schema()incodex-toolscore/src/tools/spec.rsto consume parsed MCP tool parts fromcodex-toolscore/src/tools/spec_tests.rscodex-rs/tools/README.mdto describe this second migration stepTest plan
cargo test -p codex-toolscargo test -p codex-core --lib tools::spec::