Repository navigation
Closed
Labels
Milestone
Description
Problem
When using npx @modelcontextprotocol/inspector --cli --method tools/list, the inspector silently accepts invalid JSON Schema constructs that MCP clients like Claude Code reject. This makes debugging MCP server issues extremely difficult.
Example: Invalid schema accepted by inspector but rejected by Claude Code
The Go SDK's jsonschema package generates true for interface{} types:
{
"name": "info",
"outputSchema": {
"type": "object",
"properties": {
"data": true, // Invalid - should be a type definition
"topic": { "type": "string" }
}
}
}The inspector's tools/list returns this without any warning, but Claude Code rejects it with:
[ERROR] MCP server "my-server" Failed to fetch tools: [
{
"code": "custom",
"path": ["tools", 7, "outputSchema", "properties", "data"],
"message": "Invalid input"
}
]
Other problematic patterns not caught:
"type": ["null", "boolean"]- nullable type syntax- Bare
truefor any-type fields (from Go'sinterface{}) - Missing required
typefields
Proposed Solution
Add a --strict flag (or make it default) that validates tool schemas against JSON Schema Draft-07/2020-12 and reports actionable errors:
$ npx @modelcontextprotocol/inspector --cli --method tools/list --strict ./my-server
Error: Invalid JSON Schema in tool "info"
Path: outputSchema.properties.data
Issue: Bare 'true' is not a valid type definition
Suggestion: Use {"type": "object", "additionalProperties": true} for dynamic types
Error: Invalid JSON Schema in tool "get_tree"
Path: inputSchema.properties.show_ids.type
Issue: Array type syntax ["null", "boolean"] may not be supported by all clients
Suggestion: Use {"type": "boolean"} with "nullable": true, or make field optionalBenefits
- Faster debugging - Catch schema issues before deploying to MCP clients
- Better DX - Clear error messages with fix suggestions
- Ecosystem health - Encourage well-formed schemas across MCP servers
Related
outputSchemadoes not fully support JSON Schema #552 -outputSchemadoes not fully support JSON Schema (similar validation gap)- Support JSON Schema
allOf,oneOf, etc. #496 - Support JSON SchemaallOf,oneOf, etc.
Activity
cliffhall commentedon Aug 1, 2026
Triage: Priority = Medium
Scored 7/16 with the priority rubric added to
AGENTS.mdin #1891, as part of the backlog triage in #1872. Added to project board #28 with Status Incoming — meaning filed and scored but not yet approved for work. A maintainer decides whether it moves to Todo.Related issues. One connected issue:
Scores are a starting point, not a verdict — the rubric is meant to be overruled when it's plainly wrong, provided the reason is written down.
cmun2 commentedon Aug 23, 2026
I measured how much of this actually bites, in case it is useful for the triage.
I launched 617 public MCP servers over stdio and captured their real
tools/listresponses — 14,804 tool schemas — then applied three published constraint sets to that one corpus.The axis this issue is about — JSON Schema validity, bare
trueschemas, missingtype— is real, but rare in the wild. MCP-spec conformance fails 0 of 617 servers, judged with the official TypeScript SDK's ownListToolsResultSchema.safeParserather than a reimplementation.What does bite is the layer above it: the narrower subset each provider accepts once strict tool use is on.
strict— hard rejectstrict: truesubsetAnd they are nested rather than parallel: every one of the 170 OpenAI failures also fails an Anthropic axis, but 277 servers pass OpenAI's converter and still fail Anthropic's. Clearing one provider says very little about the other.
Caveat up front: no API was called. Verdicts come from the providers' published constraint tables quoted verbatim, plus their own production code — the MCP TS SDK parser,
openai-agents'ensure_strict_json_schema, and the Anthropic Python SDK'stransform_schema. This is not end-to-end verified against a live endpoint, and where a document is silent I record it as an ambiguity rather than guessing. The largest of those isadditionalPropertiesomission, which is unspecified and affects 414/617 — it could push 63% into the 90s or leave it untouched.Data, methodology and a one-line reproduction command for every individual verdict: https://github.com/cmun2/mcp-schema-census
Posting it here because the triage note says a server can pass Inspector and fail in Claude Code, and this is the size of that gap as far as I could measure it. Whether it changes the priority is yours to judge.
cliffhall commentedon Aug 24, 2026
Triage: Priority Medium (total 6)
tools/listoutput) is partialenhancementnotbug; no milestone yet; 3 comments / 0 reactions; unassigned)Board: #28, Status
Incoming(awaiting maintainer review — no milestone yet).feat: flag unportable tool schemas in all three clients
docs: address Copilot round 4 on the roadmap realignment (#2401 review)