Repository navigation
Keep $ref pointers when inlining would produce an oversized schema - #5421
Conversation
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87ef770661
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if not _within_inline_limits(schema, follow_refs=True): | ||
| return resolve_root_ref(schema) |
There was a problem hiding this comment.
Resolve non-$defs root pointers before returning
When an oversized acyclic schema uses a root reference in another supported form, such as Draft 7's #/definitions/Root, this branch calls resolve_root_ref, but that helper only handles direct #/$defs/<name> references. The dereference middleware consequently sends the original root $ref without the promised root-level resolution; for output schemas this also omits the MCP-required root type: object and may cause clients to reject the tool listing. Resolve the root through the general local-pointer path while retaining its definitions.
AGENTS.md reference: AGENTS.md:L180-L182
Useful? React with 👍 / 👎.
|
I have enough evidence to write the report — nothing in the full server-side log points to an error during the three failing task scenarios, and the PR's only functional change is scoped away from the tasks code path. What failedJob: MCP conformance tests —
( Evidenced cause: unrelated to the PR diff, root cause not identifiedThis PR only touches
This rules out the PR's code change as the mechanism, but the conformance CLI's default output gives pass/fail counts only — no per-assertion diff — so I could not determine what wire-level expectation these 3 scenarios actually violate from this log alone.
What remains unknownWhether these 3 scenarios already fail on Next actionRun |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06cb177953
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # describe the root schema even when we can only resolve that | ||
| # root reference for circular schemas. Siblings include `$defs` (or | ||
| # `definitions`), which stay for nested references. | ||
| resolved = dict(target) |
There was a problem hiding this comment.
Chase root-reference aliases before returning the compact schema
When an oversized acyclic schema has a root $ref pointing to an alias definition that itself points to the object definition, this copies only the alias, leaving a root $ref and no type: object. Such schemas are accepted by _is_object_schema, and before this change the acyclic graph was fully inlined, but the new size fallback can now emit a noncompliant output schema to clients; follow local root references to the concrete object with a cycle guard. Fresh evidence beyond the earlier pointer-form report is that this still fails with ordinary #/$defs/... pointers when they form a transitive alias chain.
AGENTS.md reference: AGENTS.md:L180-L182
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38a18ca31c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ref = node.get("$ref") | ||
| if isinstance(ref, str) and ref.startswith("#"): | ||
| children = [*children, _resolve_local_ref(root, ref)] |
There was a problem hiding this comment.
Defer proxy-traversing pointers to jsonref
When a local pointer traverses a definition that is itself a $ref—for example, #/$defs/Alias/properties/value, where Alias points to Actual but has no raw properties—this lookup raises _CannotInline, causing the preflight to reject the schema and return it unchanged before jsonref runs. jsonref resolves through these proxy nodes, and the added lists_through_refs_schema test explicitly relies on that behavior, so default dereference_schemas=True now leaves otherwise small, supported schemas containing $ref for clients that require flattened schemas. Treat an inconclusive raw lookup as a reason to rely on the post-jsonref size check rather than aborting inlining. Fresh evidence beyond the earlier root-pointer reports is this non-root pointer-through-alias path, which never reaches jsonref at all.
AGENTS.md reference: AGENTS.md:L180-L182
Useful? React with 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> ## Summary - Raise the `fastmcp` floor from `>=4.0.10` to `>=4.0.11` in `pyproject.toml` and `fastmcp.json`, and refresh `uv.lock` so `fastmcp` and `fastmcp-slim` resolve to 4.0.11. `mcp>=2.2.0` is unchanged (still locked at 2.2.0). - Patch SemVer **1.2.9 → 1.2.10** on `pyproject.toml`, `src/espn_mcp/__init__.py`, `server.json` (root and package), `CHANGELOG.md`, and `skills/espn-mcp/SKILL.md`. The `AGENTS.md` layout comment that records the floor is updated to match. README is unchanged. No server code changes. No tag or publish. FastMCP 4.0.11 security fixes, as they apply to this repo: - **Applies — SSE Host/Origin ([#5427](PrefectHQ/fastmcp#5427 The CLI exposes `--transport sse` and `--transport streamable-http`. `main()` forwards `host_origin_protection`, `allowed_hosts`, and `allowed_origins` into `FastMCP.run()`. #5427 applies that Host/Origin policy to the legacy SSE connection and message endpoints, the same way Streamable HTTP already honored it. Default transport, `fastmcp.json`, `server.json`, and the Docker image stay on stdio; the fix matters when SSE is selected. - **Applies — auth and hashed tool lookups ([#5425](PrefectHQ/fastmcp#5425), [#5415](PrefectHQ/fastmcp#5415 This is a FastMCP tool server: a root gateway plus mounted games, teams, and news servers, with optional `RegexSearchTransform`. #5415 makes hashed tool-name lookups honor transforms, enabled state, and auth. #5425 sends component-manager routes through the server's auth provider. No custom `AuthProvider` is configured, so this PR does not add an application auth policy; the dependency closes those framework bypasses. - **Does not apply — OpenAPI ([#5423](PrefectHQ/fastmcp#5423 Nothing here builds tools with FastMCP's OpenAPI provider. `scripts/check_openapi_drift.py` compares ESPN REST client routes to an OpenAPI document; that is not the FastMCP OpenAPI component path #5423 fixes. - **Does not apply — schema nesting client fixes ([#5413](PrefectHQ/fastmcp#5413), [#5434](PrefectHQ/fastmcp#5434), [#5436](PrefectHQ/fastmcp#5436), [#5421](PrefectHQ/fastmcp#5421 Those bound FastMCP client schema conversion. This package does not embed a FastMCP client. `fastmcp.Client` is used only in `tests/test_protocol.py`. The ESPN client is httpx. ## Related - FastMCP v4.0.11 (Fort Knocks): https://github.com/PrefectHQ/fastmcp/releases/tag/v4.0.11 - Prior floor bump: #37 (`fastmcp>=4.0.10`, package 1.2.9) ## Tested - `uv sync --locked --extra dev` — pass; installed `fastmcp==4.0.11`, `fastmcp-slim==4.0.11`, `mcp==2.2.0`, `mcp-server-espn==1.2.10` - `uv run ruff check .` — pass - `uv run ruff format --check .` — pass (29 files already formatted) - `uv run mypy --strict src/` — pass (10 source files) - `uv run pytest --cov=src/espn_mcp --cov-fail-under=100` — pass (85 passed, 1 deselected, 100% coverage) - `uv run python scripts/check_tool_contract.py` — pass (33 tools) - `uv run python scripts/check_openapi_drift.py` — pass (no breaking drift) - `./scripts/check_conformance.sh` — pass (baseline check passed; server banner FastMCP 4.0.11, espn-mcp 1.2.10) <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-f1994fa7-5358-532a-930e-c7d30f707225?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-f1994fa7-5358-532a-930e-c7d30f707225&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Release** * Updated the package to version 1.2.10. * The minimum supported FastMCP version is now 4.0.11. Ensure your environment meets this requirement before upgrading. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Christian Claudio <christianclaudio@users.noreply.github.com>
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [fastmcp](https://github.com/PrefectHQ/fastmcp) | `>=4.0.10,<4.1` → `>=4.1,<4.2` |  |  | --- ### Release Notes <details> <summary>PrefectHQ/fastmcp (fastmcp)</summary> ### [`v4.1.0`](https://github.com/PrefectHQ/fastmcp/releases/tag/v4.1.0): : Fourth and One [Compare Source](PrefectHQ/fastmcp@v4.0.11...v4.1.0) FastMCP 4.1.0 is a maintenance release at heart: a broad sweep of fixes across OpenAPI, proxies, auth, tasks, and the CLI, plus full Python 3.15 support. It doesn't change how most servers behave. A few security fixes do tighten inputs that FastMCP previously accepted, though, and our versioning policy keeps breaking changes out of patch releases, so this ships as a point-one release. Check these before upgrading: - **MultiAuth** now qualifies client IDs by source, so existing MultiAuth sessions and tasks start new ownership scopes. Finish pending tasks before upgrading. - **Regex tool search** uses Pydantic's regex engine, which doesn't support lookarounds or backreferences. - **Skill files** must resolve inside their configured directories. - **OpenAPI path parameters** reject `.` and `..` segments. - **HTTP sessions** now expire after the MCP SDK's 30-minute idle default instead of never. - **CodeMode** requires Monty 1.1, which renames `max_duration_secs` to `max_feed_duration_secs`. Thanks to our 48 contributors, including 21 first-time contributors! <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Breaking Changes⚠️ - fix(http): preserve the SDK's default session idle timeout by [@​asts-top](https://github.com/asts-top) in [#​5229](PrefectHQ/fastmcp#5229) - Restore full Python 3.15 support by [@​Kludex](https://github.com/Kludex) in [#​5558](PrefectHQ/fastmcp#5558) ##### Enhancements ✨ - enhancement: Configure token introspection audiences by [@​jlowin](https://github.com/jlowin) and [@​sajdakabir](https://github.com/sajdakabir) in [#​5461](PrefectHQ/fastmcp#5461) - fix: Make proxy HTTP header forwarding configurable by [@​jlowin](https://github.com/jlowin) in [#​5462](PrefectHQ/fastmcp#5462) - enhancement: Configure upload retention in memory by [@​jlowin](https://github.com/jlowin) and [@​warlocksmurf](https://github.com/warlocksmurf) in [#​5463](PrefectHQ/fastmcp#5463) - Clarify maintainer review decisions by [@​jlowin](https://github.com/jlowin) in [#​5466](PrefectHQ/fastmcp#5466) - feat: persist encrypted CLI OAuth tokens by [@​andreivince](https://github.com/andreivince) in [#​5405](PrefectHQ/fastmcp#5405) - feat(auth): add TokenCache support to GoogleTokenVerifier and GoogleProvider by [@​jerive](https://github.com/jerive) in [#​5366](PrefectHQ/fastmcp#5366) - Add gitleaks secret scanning to prek by [@​strawgate](https://github.com/strawgate) in [#​5355](PrefectHQ/fastmcp#5355) - Keep review design decisions with maintainers by [@​jlowin](https://github.com/jlowin) in [#​5468](PrefectHQ/fastmcp#5468) ##### Security 🔒 - fix!: Qualify MultiAuth client identities by [@​jlowin](https://github.com/jlowin) in [#​5455](PrefectHQ/fastmcp#5455) - fix!: Validate OpenAPI path parameter segments by [@​jlowin](https://github.com/jlowin) in [#​5457](PrefectHQ/fastmcp#5457) - fix!: Resolve skill files within their configured directories by [@​jlowin](https://github.com/jlowin) and [@​GEONWOOHAN](https://github.com/GEONWOOHAN) in [#​5459](PrefectHQ/fastmcp#5459) - fix!: Use Pydantic’s regex engine for tool search by [@​jlowin](https://github.com/jlowin) in [#​5467](PrefectHQ/fastmcp#5467) ##### Fixes 🐞 - fix: Share JWKS refreshes across key lookups by [@​jlowin](https://github.com/jlowin) in [#​5456](PrefectHQ/fastmcp#5456) - fix: Reuse shared OpenAPI composition members by [@​jlowin](https://github.com/jlowin) in [#​5460](PrefectHQ/fastmcp#5460) - Resolve app tool names against the transformed catalog by [@​jlowin](https://github.com/jlowin) in [#​5464](PrefectHQ/fastmcp#5464) - fix: keep generator iteration inside dependency lifetime by [@​mikamikasuki](https://github.com/mikamikasuki) in [#​5438](PrefectHQ/fastmcp#5438) - fix(tools): consume synchronous generators within dispatched invocation by [@​HootRock](https://github.com/HootRock) in [#​5376](PrefectHQ/fastmcp#5376) - fix(tools): reject results returned after timeout deadlines by [@​HootRock](https://github.com/HootRock) in [#​5379](PrefectHQ/fastmcp#5379) - Fix [#​5368](PrefectHQ/fastmcp#5368): Tool.from_tool: a transform_fn that declares ctx: Context fails on eve by [@​nandanadileep](https://github.com/nandanadileep) and [@​chrikrah](https://github.com/chrikrah) in [#​5371](PrefectHQ/fastmcp#5371) - fix(auth): preserve AuthKit issuer identity by [@​mikamikasuki](https://github.com/mikamikasuki) and [@​paddynatte](https://github.com/paddynatte) in [#​5452](PrefectHQ/fastmcp#5452) - fix(auth): advertise resource_metadata only when a route serves it by [@​alex-feel](https://github.com/alex-feel) in [#​5363](PrefectHQ/fastmcp#5363) - fix: decode escaped JSON Pointer tokens during hydration by [@​HuaTNA](https://github.com/HuaTNA) in [#​5407](PrefectHQ/fastmcp#5407) - fix: read MCP config files as UTF-8 in the install commands by [@​ch-z-hc](https://github.com/ch-z-hc) in [#​5359](PrefectHQ/fastmcp#5359) - Add regression coverage for root-context schema caching by [@​hulkbig](https://github.com/hulkbig) in [#​5397](PrefectHQ/fastmcp#5397) - Keep the original cause when ErrorHandlingMiddleware re-raises an error unchanged by [@​asasemahmed](https://github.com/asasemahmed) in [#​5344](PrefectHQ/fastmcp#5344) - Resolve ASGIServer.http_client relative URLs against the server origin by [@​asasemahmed](https://github.com/asasemahmed) in [#​5341](PrefectHQ/fastmcp#5341) - Raise startup failures from run_server_async instead of hanging by [@​asasemahmed](https://github.com/asasemahmed) in [#​5340](PrefectHQ/fastmcp#5340) - Restrict Windows CLI state access without requiring SeSecurityPrivilege by [@​asasemahmed](https://github.com/asasemahmed) in [#​5312](PrefectHQ/fastmcp#5312) - Advertise the same list_changed capabilities over stdio as other transports by [@​asasemahmed](https://github.com/asasemahmed) in [#​5311](PrefectHQ/fastmcp#5311) - Validate responses to dict and nested-list elicitation choices by [@​asasemahmed](https://github.com/asasemahmed) in [#​5343](PrefectHQ/fastmcp#5343) - Inline enums shared by several fields in elicitation schemas by [@​asasemahmed](https://github.com/asasemahmed) in [#​5342](PrefectHQ/fastmcp#5342) - Honor the SDK ElicitResult returned by an elicitation handler by [@​asasemahmed](https://github.com/asasemahmed) in [#​5339](PrefectHQ/fastmcp#5339) - Look up call_tool output schemas across all tools/list pages by [@​asasemahmed](https://github.com/asasemahmed) in [#​5338](PrefectHQ/fastmcp#5338) - Deduplicate versions in PromptsAsTools and ResourcesAsTools list tools by [@​asasemahmed](https://github.com/asasemahmed) in [#​5331](PrefectHQ/fastmcp#5331) - Map File text formats to canonical text MIME types by [@​asasemahmed](https://github.com/asasemahmed) in [#​5334](PrefectHQ/fastmcp#5334) - Keep generated OpenAPI component names unique when a suffixed name is taken by [@​asasemahmed](https://github.com/asasemahmed) in [#​5337](PrefectHQ/fastmcp#5337) - Keep is_error when ResponseLimitingMiddleware truncates a result by [@​asasemahmed](https://github.com/asasemahmed) in [#​5309](PrefectHQ/fastmcp#5309) - Read +json OpenAPI resource responses as JSON text by [@​asasemahmed](https://github.com/asasemahmed) in [#​5310](PrefectHQ/fastmcp#5310) - Preserve provider challenge defaults through MultiAuth by [@​taylorwilsdon](https://github.com/taylorwilsdon) in [#​5454](PrefectHQ/fastmcp#5454) - Write generate-cli output as UTF-8 by [@​asasemahmed](https://github.com/asasemahmed) and [@​ch-z-hc](https://github.com/ch-z-hc) in [#​5335](PrefectHQ/fastmcp#5335) - Strip internal visibility meta from prompt results and static resources by [@​asasemahmed](https://github.com/asasemahmed) in [#​5330](PrefectHQ/fastmcp#5330) - Register browser OAuth clients as public clients by [@​goran-revops](https://github.com/goran-revops) in [#​5231](PrefectHQ/fastmcp#5231) - fix(client): preserve unique JSON arrays by [@​lzyruc](https://github.com/lzyruc) in [#​5270](PrefectHQ/fastmcp#5270) - Keep filesystem reloads serialized during cancellation by [@​sherxlg-gif](https://github.com/sherxlg-gif) in [#​5184](PrefectHQ/fastmcp#5184) - Treat upstream HTTP errors from OpenAPI tools as HTTP status errors by [@​asasemahmed](https://github.com/asasemahmed) in [#​5308](PrefectHQ/fastmcp#5308) - chore(ty): pin the checked platform to the one CI uses ([#​5302](PrefectHQ/fastmcp#5302)) by [@​sclfcz](https://github.com/sclfcz) in [#​5303](PrefectHQ/fastmcp#5303) - fix(tools): take partial tool names and docstrings from the wrapped function by [@​BlueX888](https://github.com/BlueX888) and [@​Ares16x16](https://github.com/Ares16x16) in [#​5269](PrefectHQ/fastmcp#5269) - fix(tools): keep structured content for object schemas without explicit type by [@​BlueX888](https://github.com/BlueX888) in [#​5271](PrefectHQ/fastmcp#5271) - fix: return current tool schemas from cached BM25 searches by [@​baba9811](https://github.com/baba9811) in [#​5153](PrefectHQ/fastmcp#5153) - fix(azure): send prompt=select_account to Entra instead of the consent URL by [@​mayankkumar-cmd](https://github.com/mayankkumar-cmd) in [#​5162](PrefectHQ/fastmcp#5162) - fix(auth): preserve upstream refresh error semantics by [@​77cjj](https://github.com/77cjj) in [#​5011](PrefectHQ/fastmcp#5011) - Clean up run_server_async when startup exits early by [@​syf2211](https://github.com/syf2211) and [@​asasemahmed](https://github.com/asasemahmed) in [#​5469](PrefectHQ/fastmcp#5469) - Pass resource security policy through FileSystemProvider discovery by [@​asasemahmed](https://github.com/asasemahmed) in [#​5498](PrefectHQ/fastmcp#5498) - Forward annotations on proxied resources and resource templates by [@​asasemahmed](https://github.com/asasemahmed) in [#​5499](PrefectHQ/fastmcp#5499) - Forward the resources/read result meta through proxies by [@​asasemahmed](https://github.com/asasemahmed) in [#​5500](PrefectHQ/fastmcp#5500) - Fix proxy dropping log messages whose data is not a msg/extra dict by [@​asasemahmed](https://github.com/asasemahmed) in [#​5501](PrefectHQ/fastmcp#5501) - Forward stop_sequences in the proxy's sampling relay by [@​asasemahmed](https://github.com/asasemahmed) in [#​5502](PrefectHQ/fastmcp#5502) - Treat non-Bearer Authorization schemes as missing authentication by [@​asasemahmed](https://github.com/asasemahmed) in [#​5503](PrefectHQ/fastmcp#5503) - Reject positional-only parameters in prompts and resource templates by [@​asasemahmed](https://github.com/asasemahmed) in [#​5505](PrefectHQ/fastmcp#5505) - Carry domain and prefers_border onto the Prefab renderer resource by [@​asasemahmed](https://github.com/asasemahmed) in [#​5611](PrefectHQ/fastmcp#5611) - Keep GenerativeUI CSP on the renderer resource only by [@​asasemahmed](https://github.com/asasemahmed) in [#​5612](PrefectHQ/fastmcp#5612) - Keep OpenAPI path segments that contain a colon by [@​asasemahmed](https://github.com/asasemahmed) in [#​5613](PrefectHQ/fastmcp#5613) - Print install mcp-json and inspect JSON without Rich wrapping by [@​asasemahmed](https://github.com/asasemahmed) in [#​5615](PrefectHQ/fastmcp#5615) - Coerce optional parameters in fastmcp call by their non-null type by [@​asasemahmed](https://github.com/asasemahmed) in [#​5616](PrefectHQ/fastmcp#5616) - Return the existing component when an ignored duplicate is added by [@​asasemahmed](https://github.com/asasemahmed) in [#​5617](PrefectHQ/fastmcp#5617) - Keep a config client's servers connected when a new() clone connects by [@​asasemahmed](https://github.com/asasemahmed) in [#​5618](PrefectHQ/fastmcp#5618) - Strip discriminator under properties named default, const, enum or examples by [@​asasemahmed](https://github.com/asasemahmed) in [#​5619](PrefectHQ/fastmcp#5619) - Keep a finished task's status when it is cancelled by [@​asasemahmed](https://github.com/asasemahmed) in [#​5621](PrefectHQ/fastmcp#5621) - Forward --skip-source to the uv run subprocess in fastmcp run by [@​asasemahmed](https://github.com/asasemahmed) in [#​5623](PrefectHQ/fastmcp#5623) - Send numeric and boolean OpenAPI raw bodies as text by [@​asasemahmed](https://github.com/asasemahmed) in [#​5624](PrefectHQ/fastmcp#5624) - Map Anthropic stop_sequence to the MCP stopSequence stop reason by [@​asasemahmed](https://github.com/asasemahmed) in [#​5625](PrefectHQ/fastmcp#5625) - Escape the server spec and name in the generate-cli header docstring by [@​asasemahmed](https://github.com/asasemahmed) in [#​5626](PrefectHQ/fastmcp#5626) - Fix context docs: request_context.meta is a dict, not an attribute object by [@​asasemahmed](https://github.com/asasemahmed) in [#​5631](PrefectHQ/fastmcp#5631) - Validate strict tool input in JSON mode by [@​asasemahmed](https://github.com/asasemahmed) in [#​5504](PrefectHQ/fastmcp#5504) - Raise when a required OpenAPI path parameter is missing by [@​asasemahmed](https://github.com/asasemahmed) in [#​5614](PrefectHQ/fastmcp#5614) - Omit writeOnly properties from OpenAPI tool output schemas by [@​asasemahmed](https://github.com/asasemahmed) in [#​5336](PrefectHQ/fastmcp#5336) - fix(tasks): keep stored arguments alive with the other per-task keys by [@​sclfcz](https://github.com/sclfcz) in [#​5144](PrefectHQ/fastmcp#5144) - fix(auth): omit scopes from generic authorization code exchange by [@​liang0417](https://github.com/liang0417) and [@​kiranthakkar](https://github.com/kiranthakkar) in [#​5183](PrefectHQ/fastmcp#5183) - Reject missing and unexpected arguments at task submission by [@​asasemahmed](https://github.com/asasemahmed) in [#​5622](PrefectHQ/fastmcp#5622) - fix(auth): preserve verifier-defined challenge scopes through wrappers by [@​mikamikasuki](https://github.com/mikamikasuki) in [#​5478](PrefectHQ/fastmcp#5478) - fix(server): VersionFilter get_tool/get_resource/get_prompt respect include_unversioned=False by [@​Ashfaqbs](https://github.com/Ashfaqbs) and [@​Purin1410](https://github.com/Purin1410) in [#​4949](PrefectHQ/fastmcp#4949) - Stop asserting that the GitHub remote server lacks structured content by [@​jlowin](https://github.com/jlowin) in [#​5634](PrefectHQ/fastmcp#5634) - Skip skills whose SKILL.md is not valid UTF-8 during directory discovery by [@​asasemahmed](https://github.com/asasemahmed) in [#​5497](PrefectHQ/fastmcp#5497) - Fix tool body validation errors at the MCP boundary by [@​qingshungLI](https://github.com/qingshungLI) and [@​alastair](https://github.com/alastair) in [#​5485](PrefectHQ/fastmcp#5485) - Detect client extensions without requiring clientInfo by [@​alex-feel](https://github.com/alex-feel) in [#​5196](PrefectHQ/fastmcp#5196) - Propagate child cancellation from gather by [@​dennisimoo](https://github.com/dennisimoo) and [@​lokesh0186](https://github.com/lokesh0186) in [#​5161](PrefectHQ/fastmcp#5161) - fix(resources): separate URI fragments from query values by [@​Harsh23Kashyap](https://github.com/Harsh23Kashyap) in [#​5132](PrefectHQ/fastmcp#5132) - fix: preserve input requests in resource and prompt tools by [@​HootRock](https://github.com/HootRock) and [@​andreivince](https://github.com/andreivince) in [#​5476](PrefectHQ/fastmcp#5476) - fix(docstrings): don't leak Returns/Raises into description for parameterless functions by [@​Ashfaqbs](https://github.com/Ashfaqbs) and [@​pvliesdonk](https://github.com/pvliesdonk) in [#​5067](PrefectHQ/fastmcp#5067) - fix(client): hydrate formatted scalars and positional array items by [@​FanouZeng-TT](https://github.com/FanouZeng-TT), [@​MarcHuang168](https://github.com/MarcHuang168), [@​lzyruc](https://github.com/lzyruc), and [@​onk3sh](https://github.com/onk3sh) in [#​5203](PrefectHQ/fastmcp#5203) ##### Docs 📚 - docs: credit contributors in v4.0.11 changelog entries by [@​jlowin](https://github.com/jlowin) in [#​5449](PrefectHQ/fastmcp#5449) - Clarify CodeMode execution context by [@​jlowin](https://github.com/jlowin) in [#​5458](PrefectHQ/fastmcp#5458) - docs: explain Inspector entrypoint initialization by [@​andreivince](https://github.com/andreivince) and [@​nick-youngblut](https://github.com/nick-youngblut) in [#​5404](PrefectHQ/fastmcp#5404) - Docs: show post-call inspection of tool text results by [@​Amazinghorseli](https://github.com/Amazinghorseli) and [@​roli-lpci](https://github.com/roli-lpci) in [#​5385](PrefectHQ/fastmcp#5385) - Document FastMCP Client use cases by [@​andreivince](https://github.com/andreivince) in [#​5482](PrefectHQ/fastmcp#5482) - docs: show tests for MCP mounted in FastAPI by [@​andreivince](https://github.com/andreivince) and [@​DeoLeung](https://github.com/DeoLeung) in [#​5471](PrefectHQ/fastmcp#5471) - Document OpenTelemetry log export by [@​andreivince](https://github.com/andreivince) in [#​5483](PrefectHQ/fastmcp#5483) - docs: explain OpenAPI client timeouts by [@​andreivince](https://github.com/andreivince) and [@​dimitribarbot](https://github.com/dimitribarbot) in [#​5470](PrefectHQ/fastmcp#5470) - Clarify Python projects and Cursor workspaces in install docs by [@​andreivince](https://github.com/andreivince) and [@​nick-youngblut](https://github.com/nick-youngblut) in [#​5475](PrefectHQ/fastmcp#5475) - Remove comments from fastmcp.json docs examples by [@​asasemahmed](https://github.com/asasemahmed) in [#​5627](PrefectHQ/fastmcp#5627) - Fix mcp-json Advanced Configuration example output by [@​asasemahmed](https://github.com/asasemahmed) in [#​5628](PrefectHQ/fastmcp#5628) - Remove FASTMCP_SERVER_DEPENDENCIES from the settings reference by [@​asasemahmed](https://github.com/asasemahmed) in [#​5629](PrefectHQ/fastmcp#5629) - Fix versioning docs: get_tool takes a VersionSpec and returns None for a missing version by [@​asasemahmed](https://github.com/asasemahmed) in [#​5630](PrefectHQ/fastmcp#5630) - Fix authorization docs: AccessToken field types and built-in check count by [@​asasemahmed](https://github.com/asasemahmed) in [#​5632](PrefectHQ/fastmcp#5632) ##### Examples & Contrib 💡 - Don't evaluate properties when registering MCPMixin methods by [@​asasemahmed](https://github.com/asasemahmed) in [#​5620](PrefectHQ/fastmcp#5620) ##### Dependencies 📦 - chore(deps): bump the uv group across 2 directories with 2 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​5393](PrefectHQ/fastmcp#5393) #### New Contributors - [@​mikamikasuki](https://github.com/mikamikasuki) made their first contribution in [#​5438](PrefectHQ/fastmcp#5438) - [@​HootRock](https://github.com/HootRock) made their first contribution in [#​5376](PrefectHQ/fastmcp#5376) - [@​alex-feel](https://github.com/alex-feel) made their first contribution in [#​5363](PrefectHQ/fastmcp#5363) - [@​HuaTNA](https://github.com/HuaTNA) made their first contribution in [#​5407](PrefectHQ/fastmcp#5407) - [@​andreivince](https://github.com/andreivince) made their first contribution in [#​5404](PrefectHQ/fastmcp#5404) - [@​ch-z-hc](https://github.com/ch-z-hc) made their first contribution in [#​5359](PrefectHQ/fastmcp#5359) - [@​Amazinghorseli](https://github.com/Amazinghorseli) made their first contribution in [#​5385](PrefectHQ/fastmcp#5385) - [@​hulkbig](https://github.com/hulkbig) made their first contribution in [#​5397](PrefectHQ/fastmcp#5397) - [@​jerive](https://github.com/jerive) made their first contribution in [#​5366](PrefectHQ/fastmcp#5366) - [@​goran-revops](https://github.com/goran-revops) made their first contribution in [#​5231](PrefectHQ/fastmcp#5231) - [@​lzyruc](https://github.com/lzyruc) made their first contribution in [#​5270](PrefectHQ/fastmcp#5270) - [@​sherxlg-gif](https://github.com/sherxlg-gif) made their first contribution in [#​5184](PrefectHQ/fastmcp#5184) - [@​baba9811](https://github.com/baba9811) made their first contribution in [#​5153](PrefectHQ/fastmcp#5153) - [@​mayankkumar-cmd](https://github.com/mayankkumar-cmd) made their first contribution in [#​5162](PrefectHQ/fastmcp#5162) - [@​77cjj](https://github.com/77cjj) made their first contribution in [#​5011](PrefectHQ/fastmcp#5011) - [@​liang0417](https://github.com/liang0417) made their first contribution in [#​5183](PrefectHQ/fastmcp#5183) - [@​Ashfaqbs](https://github.com/Ashfaqbs) made their first contribution in [#​4949](PrefectHQ/fastmcp#4949) - [@​qingshungLI](https://github.com/qingshungLI) made their first contribution in [#​5485](PrefectHQ/fastmcp#5485) - [@​dennisimoo](https://github.com/dennisimoo) made their first contribution in [#​5161](PrefectHQ/fastmcp#5161) - [@​FanouZeng-TT](https://github.com/FanouZeng-TT) made their first contribution in [#​5203](PrefectHQ/fastmcp#5203) - [@​GEONWOOHAN](https://github.com/GEONWOOHAN) made their first contribution in [#​5459](PrefectHQ/fastmcp#5459) **Full Changelog**: <PrefectHQ/fastmcp@v4.0.11...v4.1.0> ### [`v4.0.11`](https://github.com/PrefectHQ/fastmcp/releases/tag/v4.0.11): : Fort Knocks [Compare Source](PrefectHQ/fastmcp@v4.0.10...v4.0.11) This release contains important security and bug fixes. All users are encouraged to upgrade. Thanks to our 10 contributors, including 6 first-time contributors. <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Enhancements ✨ - agents: make AGENTS.md the entry point and tighten repo skills by [@​zzstoatzz](https://github.com/zzstoatzz) in [#​5278](PrefectHQ/fastmcp#5278) - ci: publish maintenance status and add MAINTAINING.md by [@​zzstoatzz](https://github.com/zzstoatzz) in [#​5284](PrefectHQ/fastmcp#5284) - rate_limiting: deprecate a burst_capacity below 1 by [@​zzstoatzz](https://github.com/zzstoatzz) and [@​sclfcz](https://github.com/sclfcz) in [#​5296](PrefectHQ/fastmcp#5296) - agents: consolidate PR review guidance by [@​zzstoatzz](https://github.com/zzstoatzz) in [#​5297](PrefectHQ/fastmcp#5297) - status: unify dashboard and terminal issue ranking by [@​zzstoatzz](https://github.com/zzstoatzz) in [#​5300](PrefectHQ/fastmcp#5300) - Enable ruff flake8-bandit (S) rules on the library by [@​strawgate](https://github.com/strawgate) in [#​5356](PrefectHQ/fastmcp#5356) - Bundle extensions with providers by [@​jlowin](https://github.com/jlowin) in [#​5360](PrefectHQ/fastmcp#5360) - Expand supported Python CI coverage by [@​jlowin](https://github.com/jlowin) in [#​5391](PrefectHQ/fastmcp#5391) - docs: credit issue authors in maintainer implementations by [@​jlowin](https://github.com/jlowin) in [#​5410](PrefectHQ/fastmcp#5410) - enhancement: scan release notes for shared contributor credit by [@​jlowin](https://github.com/jlowin) in [#​5433](PrefectHQ/fastmcp#5433) ##### Security 🔒 - Pass client CLI arguments literally to Windows .cmd wrappers by [@​jlowin](https://github.com/jlowin) and [@​strawgate](https://github.com/strawgate) in [#​5419](PrefectHQ/fastmcp#5419) - Build client schema types with create_model and bounded caches by [@​jlowin](https://github.com/jlowin) and [@​strawgate](https://github.com/strawgate) in [#​5413](PrefectHQ/fastmcp#5413) - Bound schema nesting before client type conversion by [@​jlowin](https://github.com/jlowin) and [@​strawgate](https://github.com/strawgate) in [#​5434](PrefectHQ/fastmcp#5434) - OpenAPI components send only declared arguments and keep configured headers by [@​jlowin](https://github.com/jlowin) and [@​strawgate](https://github.com/strawgate) in [#​5423](PrefectHQ/fastmcp#5423) - Use the server's auth provider for component manager routes by [@​jlowin](https://github.com/jlowin) and [@​strawgate](https://github.com/strawgate) in [#​5425](PrefectHQ/fastmcp#5425) - Apply Host/Origin protection settings to the SSE transport by [@​jlowin](https://github.com/jlowin) in [#​5427](PrefectHQ/fastmcp#5427) - Require a startup-URL session for the fastmcp dev apps preview by [@​jlowin](https://github.com/jlowin) and [@​strawgate](https://github.com/strawgate) in [#​5417](PrefectHQ/fastmcp#5417) - Apply transforms, enabled state, and auth to hashed tool lookups by [@​jlowin](https://github.com/jlowin) and [@​strawgate](https://github.com/strawgate) in [#​5415](PrefectHQ/fastmcp#5415) - Key cached schema adapters by the normalized schema by [@​jlowin](https://github.com/jlowin) in [#​5436](PrefectHQ/fastmcp#5436) - Resolve injected tools through the server's tool lookup by [@​jlowin](https://github.com/jlowin) in [#​5431](PrefectHQ/fastmcp#5431) - Keep $ref pointers when inlining would produce an oversized schema by [@​jlowin](https://github.com/jlowin) and [@​strawgate](https://github.com/strawgate) in [#​5421](PrefectHQ/fastmcp#5421) ##### Fixes 🐞 - rate_limiting: default burst capacity to at least 1 by [@​zzstoatzz](https://github.com/zzstoatzz) and [@​Patrick-SCH03](https://github.com/Patrick-SCH03) in [#​5293](PrefectHQ/fastmcp#5293) - types: map Image jpg/svg/tif formats to canonical MIME types by [@​zzstoatzz](https://github.com/zzstoatzz) and [@​Patrick-SCH03](https://github.com/Patrick-SCH03) in [#​5294](PrefectHQ/fastmcp#5294) - client: decode empty structured content into CallToolResult.data by [@​zzstoatzz](https://github.com/zzstoatzz) and [@​Patrick-SCH03](https://github.com/Patrick-SCH03) in [#​5291](PrefectHQ/fastmcp#5291) - fix: use portable issue ranking cache filenames by [@​zzstoatzz](https://github.com/zzstoatzz) in [#​5314](PrefectHQ/fastmcp#5314) - fix: validate cached version timestamp types by [@​Harsh23Kashyap](https://github.com/Harsh23Kashyap) in [#​5351](https://github.com/PrefectHQ/fastmcp/pull/5351) - cli: read MCP and fastmcp.json config files as utf-8 by [@​zzstoatzz](https://github.com/zzstoatzz) and [@​asasemahmed](https://github.com/asasemahmed) in [#​5345](https://github.com/PrefectHQ/fastmcp/pull/5345) - Support Python 3.15 by [@​Kludex](https://github.com/Kludex) in [#​5374](https://github.com/PrefectHQ/fastmcp/pull/5374) - Revert "Support Python 3.15" by [@​jlowin](https://github.com/jlowin) in [#​5389](https://github.com/PrefectHQ/fastmcp/pull/5389) - examples: handle malformed media links and concurrent Fire TV setup by [@​jlowin](https://github.com/jlowin) in [#​5390](https://github.com/PrefectHQ/fastmcp/pull/5390) - Fix mounted extension runtime tracking by [@​jlowin](https://github.com/jlowin) in [#​5392](https://github.com/PrefectHQ/fastmcp/pull/5392) - Fall back to pure Python YAML loader in schema tests by [@​jlowin](https://github.com/jlowin) in [#​5395](https://github.com/PrefectHQ/fastmcp/pull/5395) - tools: keep explicit Field(title=...) on parameters in the input schema by [@​zzstoatzz](https://github.com/zzstoatzz) and [@​TJReinert](https://github.com/TJReinert) in [#​5388](https://github.com/PrefectHQ/fastmcp/pull/5388) - Run Windows tests on code pull requests by [@​jlowin](https://github.com/jlowin) in [#​5408](https://github.com/PrefectHQ/fastmcp/pull/5408) - Avoid repeated traversal of shared tool schema definitions by [@​jlowin](https://github.com/jlowin) in [#​5412](https://github.com/PrefectHQ/fastmcp/pull/5412) - Keep referenced body fields when a request body schema adds sibling properties by [@​jlowin](https://github.com/jlowin) in [#​5440](https://github.com/PrefectHQ/fastmcp/pull/5440) - Require pydocket 0.26.0 so a cancelled task cannot stop the worker by [@​jlowin](https://github.com/jlowin) in [#​5444](https://github.com/PrefectHQ/fastmcp/pull/5444) ##### Docs 📚 - docs: consolidate developer and maintainer guidance by [@​zzstoatzz](https://github.com/zzstoatzz) in [#​5298](https://github.com/PrefectHQ/fastmcp/pull/5298) - examples: add interactive media picker MCP app by [@​zzstoatzz](https://github.com/zzstoatzz) in [#​5281](https://github.com/PrefectHQ/fastmcp/pull/5281) - docs: route SDK v1 users to the correct upgrade guide by [@​aritejhg](https://github.com/aritejhg) in [#​5372](https://github.com/PrefectHQ/fastmcp/pull/5372) - Clarify app visibility and configurable security guarantees by [@​jlowin](https://github.com/jlowin) in [#​5409](https://github.com/PrefectHQ/fastmcp/pull/5409) - Clarify declared header parameters in the OpenAPI docs by [@​jlowin](https://github.com/jlowin) and [@​strawgate](https://github.com/strawgate) in [#​5437](https://github.com/PrefectHQ/fastmcp/pull/5437) - docs: add v4.0.11 changelog entries by [@​jlowin](https://github.com/jlowin) in [#​5446](https://github.com/PrefectHQ/fastmcp/pull/5446) ##### Dependencies 📦 - chore(deps): bump the uv group across 2 directories with 2 updates by [@​dependabot](https://github.com/dependabot)\[bot] in [#​5361](https://github.com/PrefectHQ/fastmcp/pull/5361) ##### Other Changes 🦾 - chore(deps): Update astral-sh/setup-uv action to v10.2.0 by [@​prefect-renovate](https://github.com/prefect-renovate)\[bot] in [#​5347](https://github.com/PrefectHQ/fastmcp/pull/5347) #### New Contributors - [@​Harsh23Kashyap](https://github.com/Harsh23Kashyap) made their first contribution in [#​5351](https://github.com/PrefectHQ/fastmcp/pull/5351) - [@​aritejhg](https://github.com/aritejhg) made their first contribution in [#​5372](https://github.com/PrefectHQ/fastmcp/pull/5372) - [@​Patrick-SCH03](https://github.com/Patrick-SCH03) made their first contribution in [#​5291](PrefectHQ/fastmcp#5291) - [@​sclfcz](https://github.com/sclfcz) made their first contribution in [#​5296](PrefectHQ/fastmcp#5296) - [@​asasemahmed](https://github.com/asasemahmed) made their first contribution in [#​5345](https://github.com/PrefectHQ/fastmcp/pull/5345) - [@​TJReinert](https://github.com/TJReinert) made their first contribution in [#​5388](https://github.com/PrefectHQ/fastmcp/pull/5388) **Full Changelog**: <PrefectHQ/fastmcp@v4.0.10...v4.0.11> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNDguMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE0OC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL2RlcGVuZGVuY2llcyJdfQ==--> Reviewed-on: https://git.tainton.uk/repos/labmcp/pulls/74 Co-authored-by: renovate[bot] <renovate-bot@git.tainton.uk>
dereference_refsinlines local$refpointers 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$defsis the better result for clients and for the server.dereference_refsnow measures the expanded size before inlining, checks the structurejsonrefbuilds, 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$refis resolved, and$defsand nested$refpointers 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.github-report-21594