fastmcp/docs/servers
Jeremiah Lowin 54657de2e0
Keep $ref pointers when inlining would produce an oversized schema (#5421)
`dereference_refs` inlines local `$ref` pointers when tools and resource templates are listed (`dereference_schemas=True`). Inlining is a good default for ordinary schemas, but some definition graphs are far larger once fully expanded than they are as written. For those, keeping `$defs` is the better result for clients and for the server.

`dereference_refs` now measures the expanded size before inlining, checks the structure `jsonref` builds, and checks the final text size. Schemas that would exceed 100,000 nodes, 128 levels or about 5 million characters use the existing behavior for circular schemas: the root `$ref` is resolved, and `$defs` and nested `$ref` pointers are kept. Sibling keywords are now merged from the definition each pointer resolves to. Typical Pydantic and MCP schemas are well under these limits; the largest MCP protocol model schema measures about 25,000 nodes.

Co-authored-by: Bill Easton <williamseaston@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-10-04 11:06:02 -04:00
..
auth Clarify app visibility and configurable security guarantees (#5409) 2026-10-03 19:36:48 -04:00
providers Bundle extensions with providers (#5360) 2026-09-30 11:16:03 -04:00
transforms Clarify app visibility and configurable security guarantees (#5409) 2026-10-03 19:36:48 -04:00
authorization.mdx Clarify app visibility and configurable security guarantees (#5409) 2026-10-03 19:36:48 -04:00
completions.mdx completions: revert the list-based visibility check (#5240, #5244) (#5250) 2026-09-23 17:56:35 -05:00
composition.mdx Bundle extensions with providers (#5360) 2026-09-30 11:16:03 -04:00
context.mdx docs: refresh sidebar tags and fix audit findings across servers/clients pages (#4965) 2026-08-31 15:17:03 -05:00
dependency-injection.mdx docs: fix dead links to relocated Anthropic and Docket docs (#5205) 2026-09-22 10:25:35 -05:00
elicitation.mdx docs: attribute the back-channel removal to SEP-2322/2575, not SEP-2577 (#4988) 2026-09-04 16:37:38 -05:00
extensions.mdx Bundle extensions with providers (#5360) 2026-09-30 11:16:03 -04:00
icons.mdx Move to the stable MCP Python SDK 2.0.0 (#4655) 2026-07-28 16:31:49 -04:00
lifespan.mdx docs: refresh sidebar tags and fix audit findings across servers/clients pages (#4965) 2026-08-31 15:17:03 -05:00
logging.mdx Restructure documentation for FastMCP 3.0 (#2951) 2026-01-19 21:33:35 -05:00
middleware.mdx rate_limiting: deprecate a burst_capacity below 1 (#5296) 2026-09-26 17:38:30 -05:00
pagination.mdx docs: refresh sidebar tags and fix audit findings across servers/clients pages (#4965) 2026-08-31 15:17:03 -05:00
progress.mdx Align server component docs (#4260) 2026-07-19 14:23:36 -04:00
prompts.mdx Improve the v4 docs (#4707) 2026-07-29 09:51:13 -04:00
resources.mdx fix(resources): support exploded list query parameters (#5206) 2026-09-22 12:27:07 -05:00
sampling.mdx docs: attribute the back-channel removal to SEP-2322/2575, not SEP-2577 (#4988) 2026-09-04 16:37:38 -05:00
server.mdx Keep $ref pointers when inlining would produce an oversized schema (#5421) 2026-10-04 11:06:02 -04:00
sessions.mdx Add stateless session state (UserSession / SessionId) (#4604) 2026-07-23 19:21:00 -04:00
storage-backends.mdx docs: refresh sidebar tags and fix audit findings across servers/clients pages (#4965) 2026-08-31 15:17:03 -05:00
tasks.mdx tasks: run tools called from another tool in the foreground (#5275) 2026-09-25 12:18:35 -05:00
telemetry.mdx feat: Add telemetry interop mode for FastMCP (#4046) 2026-07-27 16:05:29 -04:00
testing.mdx Restructure docs navigation: CLI section, Composition, More (#3361) 2026-03-02 21:09:48 -05:00
tool-fingerprinting.mdx docs: add tool fingerprinting recipe for stable schema hashing (#4233) 2026-05-27 10:52:14 -04:00
tools.mdx Keep $ref pointers when inlining would produce an oversized schema (#5421) 2026-10-04 11:06:02 -04:00
versioning.mdx docs: refresh sidebar tags and fix audit findings across servers/clients pages (#4965) 2026-08-31 15:17:03 -05:00
visibility.mdx docs: refresh sidebar tags and fix audit findings across servers/clients pages (#4965) 2026-08-31 15:17:03 -05:00