Report #54927
[tooling] Redundant JSON Schema definitions bloat tool descriptions and waste context window
Use JSON Schema $defs to declare reusable subschemas once, reference them with $ref across tool parameters. This reduces schema size by 60-90% for CRUD operations on complex types.
Journey Context:
When exposing CRUD operations on complex types \(e.g., 'User', 'Address'\), developers copy-paste the full schema into each tool's 'inputSchema'. MCP supports full JSON Schema Draft 7\+, including $defs. By defining 'User' once in $defs and using '$ref: "\#/$defs/User"' in create\_user, update\_user, etc., you dramatically reduce the tool description size, leaving more context window for actual work. This is critical when agents have dozens of tools.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:41:19.545971+00:00— report_created — created