There is no numeric maximum nesting depth for MCP tool input schemas in the specification dated July 28, 2026. The limit you encounter depends on the client, server and schema validator. MCP keeps the tool input schema’s root as an object, supports JSON Schema 2020-12 by default, and recommends that implementations set resource limits such as maximum depth, subschema count or validation time.
What MCP specifies about schema depth
The MCP specification dated July 28, 2026 does not set an interoperable maximum such as five, ten or twenty levels for a tool’s inputSchema. It says implementations should apply reasonable safeguards, including a maximum schema depth, a cap on total subschemas or a time budget for each validation. Those are limits each implementation chooses, not a shared protocol number.
As an Amazon Associate I earn from qualifying purchases.
Unless a schema declares a different dialect, MCP defaults to JSON Schema 2020-12. Implementations must support that default and validate against the applicable dialect. A tool input schema must have an object at its root, but nested objects and other JSON Schema features are not subject to a universal depth figure in the current specification.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →What the 2026 schema update permits
The July 28, 2026 MCP specification release announcement says tool input and output schemas can use full JSON Schema 2020-12 features, including composition keywords, conditionals, references such as $ref, and $defs. Support for these features does not guarantee that every deployed client, SDK or model-facing adapter handles every valid schema in the same way.
#1 Best Overall
Why “nesting depth” is not the only limit
A schema’s depth is only one factor in how much work it may require. A shallow schema with extensive composition or branching can be costly to evaluate, while a deeper schema may be manageable for a particular validator. The specification therefore points to several possible safeguards rather than prescribing one depth number.
- Schema depth: how many nested schema levels the implementation permits.
- Subschema count: the total number of schema components it will process.
- Validation time: how long validation is allowed to run.
- Payload controls: limits on the arguments sent to a tool or on the request carrying them. These do not set a maximum depth for the schema itself.
For example, the MCP TypeScript SDK v1 server documentation describes an optional maxToolInputElements count for array elements and object members combined, and a 4 MiB default HTTP request-body limit. These control argument element count and HTTP request size, respectively; neither is a schema nesting limit or a protocol-wide maximum.
Rank #2
How to handle limits in your implementation
- Check the negotiated MCP protocol version. Do not assume a client targeting an older version accepts the expanded tool-schema features in the July 2026 specification.
- Check the exact SDK and validator versions in use. Their documentation or configuration is where to look for an actual numeric limit. The specification does not establish a tested depth threshold for a particular implementation.
- Set safeguards where schemas are accepted or validated. Choose depth, subschema-count and validation-time limits to fit expected workloads and the validator’s behavior; there is no universal MCP value to copy.
- Keep schemas no more complex than needed. Treat
oneOf,anyOf,allOf, conditionals and$defsas expressive features that can affect validation cost, not as automatic evidence that a schema is unsafe. - Do not automatically fetch network references. The current specification says implementations must not automatically dereference
$refvalues that resolve to network URIs. Reject unresolved external references rather than silently accepting them permissively. If network retrieval is an explicit opt-in, protect it with controls such as host allowlists, private-address rejection, timeouts, response-size limits and logging.
Do not confuse tool schemas with elicitation schemas
An earlier rule is easy to misapply: the June 18, 2025 MCP schema page restricts elicitation requestedSchema to top-level properties, without nesting. That restriction applies to elicitation forms; it is not a maximum depth for tool inputSchema. For tool schemas, use the applicable protocol version and that client’s actual schema support.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Quick Recap
Rank #4
Rank #3
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




