You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
McpServer builder extensions result in Tool InputSchema which isn't spec compliant #342
When using the JsonSchema from AIFunction additional properties not support by MCP are present. This can break clients which expect the Tool objects to follow the spec schema fully (InputSchema does not support additional properties).
GitHub Copilot (at least some versions of it) is an example of a client which will not accept the additional properties (e.g. "title", "description"). So even a minimalist MCP Server created using the README example or SDK samples will fail with such clients.
I'll have a PR with a fix soon. Just creating this for tracking purposes.
On second thought, I don't think it's realistic to remove keywords that are not type, properties, or required. JSON schema uses keywords like items, additionalProperties, enum, and anyOf to describe non-optional aspects of the schema of common input types.
What's more though, the meta-schema as defined in the MCP specification does not explicitly prohibit additional properties (there is no "additionalProperties" : false declaration). The only requirement is specifying a "type": "object" keyword something we're already validating for. I think we want to double down on the posture that clients mandating only type, properties, or required keywords are not compliant per the MCP spec /cc @dsp-ant@jspahrsummers.
In the meantime though, I can try filtering out the title and description keywords on the basis of them being duplicated in the containing tool.
Activity
eiriktsarpalis commentedon May 19, 2025
On second thought, I don't think it's realistic to remove keywords that are not
type,properties, orrequired. JSON schema uses keywords likeitems,additionalProperties,enum, andanyOfto describe non-optional aspects of the schema of common input types.What's more though, the meta-schema as defined in the MCP specification does not explicitly prohibit additional properties (there is no
"additionalProperties" : falsedeclaration). The only requirement is specifying a"type": "object"keyword something we're already validating for. I think we want to double down on the posture that clients mandating onlytype,properties, orrequiredkeywords are not compliant per the MCP spec /cc @dsp-ant @jspahrsummers.In the meantime though, I can try filtering out the
titleanddescriptionkeywords on the basis of them being duplicated in the containing tool.Fix tool calling with OpenAI Codex models
Fix tool calling with OpenAI Codex models
Fix tool calling with OpenAI Codex models
Fix tool calling with OpenAI Codex models (#1893)
Fix tool calling with OpenAI Codex models (microsoft#1893)