Stop duplicating path parameter descriptions into tool prose#3149
Stop duplicating path parameter descriptions into tool prose#3149
Conversation
Parameter details (name, description, type) already live in inputSchema where transforms can control their visibility. Duplicating path params into the prose description caused hidden params to leak through after ToolTransform hid them from the schema. Fixes #3130
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 275c4a1fb8
ℹ️ 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".
| format_deep_object_parameter, | ||
| format_description_with_responses, | ||
| format_json_for_description, |
There was a problem hiding this comment.
Keep
format_simple_description importable for compatibility
Removing format_simple_description from the public OpenAPI utilities API introduces a backwards-incompatible runtime break: existing integrations that do from fastmcp.utilities.openapi import format_simple_description (or import it from ...openapi.formatters) will now fail with ImportError immediately after upgrade. Even if provider code no longer uses it, this symbol was previously exported and documented, so it should remain as a deprecated shim to avoid breaking downstream code unexpectedly.
Useful? React with 👍 / 👎.
|
Caution Review failedThe pull request is closed. WalkthroughThis pull request removes the ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
format_simple_descriptionwas copying path parameter names and descriptions into the tool's prosedescriptionfield, even though those details already exist ininputSchema. This created a problem: whenToolTransformhides a parameter (removing it frominputSchema), the stale reference in the description remained, confusing LLMs with a parameter they couldn't actually use.The fix removes
format_simple_descriptionentirely — it was duplicating information thatinputSchemaalready carries. Parameter descriptions, types, and required flags all live ininputSchema, which is also where transforms operate, so hiding a parameter now naturally removes all traces of it.Fixes #3130