Skip to content

fix(mcp): ads discoverability, legacy ads_* aliases, lenient call_tool args - #32

Closed
Gintm wants to merge 1 commit into
developfrom
fix/mcp-ads-discoverability-and-compat
Closed

fix(mcp): ads discoverability, legacy ads_* aliases, lenient call_tool args#32
Gintm wants to merge 1 commit into
developfrom
fix/mcp-ads-discoverability-and-compat

Conversation

@Gintm

@Gintm Gintm commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

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-tag ads_* names returned Unknown tool (the #1777 tag split renamed every generated ads tool with no alias), and every call_tool invocation from Claude Desktop/Cowork failed schema validation (known client regression serializing object params as JSON strings, anthropics/claude-code#26094).

What

  • Pin the 4 ads read tools (ad_campaigns_get_ad_tree, ad_campaigns_list_ad_campaigns, ad_campaigns_list_ads, ad_insights_get_campaign_analytics) and document the search_tools/call_tool discovery pattern in the server instructions.
  • LegacyAdsAliasTransform: resolves ads_* names to their split-resource equivalents at tool lookup, mirroring the deprecated client.ads.* SDK shim (feat(ads): deprecated ads resource forwarding to the split resources #31).
  • LenientCallToolSearchTransform: call_tool now accepts arguments as a JSON-encoded string and parses it, with clear errors for non-object payloads.
  • Tests for argument coercion, alias candidate mapping, and server wiring (string args pass schema, ads tools visible).

🤖 Generated with Claude Code

…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>
@Gintm Gintm closed this Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant