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 owned the shared JSON schema parser and the MCP tool schema adapter, butcore/src/tools/spec.rsstill parsed dynamic tools directly.That left the tool-schema boundary split in two different ways:
codex-tools, while dynamic tools were still parsed incodex-corecodex-toolsalready had very similar MCP adapter outputThis change finishes that extraction boundary in one step.
codex-corestill ownsResponsesApiToolassembly, but both MCP tools and dynamic tools now enter that layer throughcodex-toolsusing the same parsed tool-definition shape.What changed
tools/src/dynamic_tool.rsand siblingtools/src/dynamic_tool_tests.rsparse_dynamic_tool()incodex-toolsand switchedcore/src/tools/spec.rsto use it for dynamic toolstools/src/parsed_tool_definition.rsso both MCP and dynamic adapters return the sameParsedToolDefinitioncore/src/tools/spec.rsto buildResponsesApiToolthrough a shared local adapter helper instead of separate MCP and dynamic assembly pathscore/src/tools/spec_tests.rsso the dynamic-tool adapter test asserts the full convertedResponsesApiTool, includingdefer_loadingcodex-rs/tools/README.mdto reflect the shared parsed tool-definition boundaryTest plan
cargo test -p codex-toolscargo test -p codex-core --lib tools::spec::Stack created with Sapling. Best reviewed with ReviewStack.