fix(mcp): ads discoverability, legacy ads_* aliases, lenient call_tool args - #32
Closed
Gintm wants to merge 1 commit into
Closed
fix(mcp): ads discoverability, legacy ads_* aliases, lenient call_tool args#32Gintm wants to merge 1 commit into
Gintm wants to merge 1 commit into
Conversation
…l args Three fixes for the MCP server surfaced by a real support case: - Pin the ads read tools (tree, campaigns, ads, analytics) and document the search_tools/call_tool pattern in the server instructions. All ads tools were hidden behind search with no mention anywhere, so chat clients concluded Zernio has no ads capability without ever searching. - Alias pre-re-tag ads_* tool names to their split-resource equivalents (ad_campaigns_*, ad_insights_*, ...) at the tool-lookup layer. The 2026-07 OpenAPI re-tag renamed them with no alias; clients holding old names got "Unknown tool". MCP counterpart of the client.ads.* SDK shim. - Accept JSON-stringified arguments in the call_tool proxy. Claude Desktop/Cowork currently serializes object params as JSON strings (anthropics/claude-code#26094), which failed schema validation on every proxied call. Co-Authored-By: Claude Fable 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
Claude in chat concluded "Zernio doesn't support Google Ads" (all ads tools hidden behind
search_tools, which it never called and the instructions never mention), calls with pre-re-tagads_*names returnedUnknown tool(the #1777 tag split renamed every generated ads tool with no alias), and everycall_toolinvocation from Claude Desktop/Cowork failed schema validation (known client regression serializing object params as JSON strings, anthropics/claude-code#26094).What
ad_campaigns_get_ad_tree,ad_campaigns_list_ad_campaigns,ad_campaigns_list_ads,ad_insights_get_campaign_analytics) and document thesearch_tools/call_tooldiscovery pattern in the server instructions.LegacyAdsAliasTransform: resolvesads_*names to their split-resource equivalents at tool lookup, mirroring the deprecatedclient.ads.*SDK shim (feat(ads): deprecatedadsresource forwarding to the split resources #31).LenientCallToolSearchTransform:call_toolnow acceptsargumentsas a JSON-encoded string and parses it, with clear errors for non-object payloads.🤖 Generated with Claude Code