feat(mcp): pass operation description, x-platforms and enums to tools - #49
Merged
Merged
Conversation
Tool descriptions carried only the OpenAPI summary, so an agent picking a tool never saw "Google only; every other platform returns 501", the supported platforms, or a parameter's allowed values. A customer's agent called the Google-only campaign targeting tool with platform=linkedin. - Tool description = summary + operation description (capped at 1000 chars, escaped) + "Platforms: ..." from x-platforms. - String enums become Literal types: the schema lists the allowed values and FastMCP rejects others before the API call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The generator passes headers= as a keyword, so the stub must keep the name. Broke ruff on develop since #48; the Tests workflow had not run there since. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
MCP tool descriptions carried only the OpenAPI summary, so agents never saw an operation's constraints, its supported platforms, or a parameter's allowed values. A customer's agent called the Google-only
ad_campaigns_get_campaign_targetingwithplatform=linkedinand got a 501.What
description(capped at 1000 chars, escaped) +Platforms: ...fromx-platforms.Literaltypes: the tool schema lists the allowed values and FastMCP rejects others before the API call.generated_tools.pyregenerated from the current spec: 942 tools, descriptions 233K → 581K chars total (max +1.1K per tool), 388 enum params across 227 tools, no parameter description changed.Follow-ups
Args:section into the description (FastMCP can't parse it, e.g.create_standalone_adat 55K chars). Pre-existing, unchanged here.🤖 Generated with Claude Code