Skip to content

fix(sdk): send DELETE request bodies and name nested keys on MCP params - #51

Merged
Gintm merged 1 commit into
developfrom
fix/delete-body-and-nested-mcp-params
Oct 6, 2026
Merged

Gintm merged 1 commit into
developfrom
fix/delete-body-and-nested-mcp-params

Conversation

@Gintm

@Gintm Gintm commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Why

The hosted MCP could not remove Google Ads assets: generated DELETE methods dropped their request body, so the API answered invalid_json_body. MCP params typed list[dict] (e.g. updates, campaigns) gave agents no keys to fill.

What

  • generate_resources.py: DELETE operations with a requestBody build the payload and pass it as data; _delete / _adelete send it as JSON.
  • generate_mcp_tools.py: object and array-of-object params list their keys (type, required, description, one level of nested keys) in the param description.
  • Regenerated resources and generated_tools.py from the committed spec; tests for both.

Follow-ups

  • The API also starts accepting the Google asset DELETE fields as query params (server PR in Schedule-Posts-API); the next spec regen documents them that way.

🤖 Generated with Claude Code

DELETE operations with a requestBody dropped it, so removals such as remove_campaign_assets reached the API with no input (invalid_json_body). MCP params typed list[dict]/dict now list the keys each object takes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gintm
Gintm merged commit 6b57c64 into develop Oct 6, 2026
4 checks passed
@Gintm
Gintm deleted the fix/delete-body-and-nested-mcp-params branch October 6, 2026 16:36
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