Repository navigation
fix: preserve tools with dependentRequired property-name maps - #1428
aphonpra-oai wants to merge 1 commit into
Conversation
|
@jamadeo is on triage rotation this week and is the reviewer for this one. Labels come from the PR labeler. Please review the change. Automated triage. Labels are a first pass and the assigned maintainer has the final say. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Hey @DaleSeo You reviewed our reconnect fix in #1363. While testing the Codex upgrade to 3.8.0, I found another issue where Could you take a look at #1428? It’s a small fix which stops the SDK from mistaking input names for header instructions and hiding valid tools. Tested discovery and successful tool calls locally through Codex. |
In a negotiated
2026-07-28Streamable HTTP session, the client can remove a valid tool when its input schema has a property namedx-mcp-headerindependentRequired.dependentRequiredmaps property names to arrays of property names. Those values are not subschemas. The annotation walker currently recurses into the map and mistakes the property name for an off-chain header annotation, causingcache_tools_from_responseto remove the tool fromtools/list.For example, this schema is valid:
{ "type": "object", "properties": { "x-mcp-header": { "type": "string" }, "tenant": { "type": "string", "x-mcp-header": "Tenant" } }, "dependentRequired": { "x-mcp-header": ["tenant"] } }Exclude
dependentRequiredfrom annotation traversal, alongside existing non-schema keywords. Continue validatingdependentSchemas, which does contain schemas. This preserves the valid tool without relaxing restrictions on actual header annotations.Regression coverage checks:
dependentSchemasremains rejected.Reference: JSON Schema 2020-12, dependentRequired.
Local validation
Both new positive regressions fail on upstream main without the production change: annotation validation rejects the valid schema, and the transport drops the tool. With the change restored, all 57 header tests and all 4 tool-list/cache tests pass, including continued rejection of actual off-chain annotations.
Commands (one build job and one test thread; features
client,transport-streamable-http-client,transport-streamable-http-server):The full workspace suite was not run locally. This draft is for review of the narrow validator fix.