Skip to content

v0.6.5

Choose a tag to compare

@github-actions github-actions released this 28 Apr 09:38
· 16 commits to main since this release

v0.6.5 — Raise list_accounts default cap from 50 to 200

If you've been running AdLoop on an agency MCC and your assistant kept saying "I can only see 50 of your accounts" — this is for you. The 50-account default cap added in v0.6.3 was a defensive measure tied to a separate bug; that bug is now fully fixed at the protocol layer, and 50 was too low for normal-sized agencies. The default is now 200.

Why 50 existed

v0.6.3 introduced _mcp_patches.py to fix python-sdk#2416, the cancellation race that crashed the entire MCP server when an MCP host sent notifications/cancelled while a long-running Google Ads call was still in-flight. Large customer_client enumerations on 100+ account MCCs were one of the most common triggers. Alongside the protocol fix, list_accounts got a conservative limit=50 cap as belt-and-braces.

Why 50 had to go

The cancellation crash and the per-response payload size on the host side are two different problems. v0.6.3's _mcp_patches.py fixed the crash. The cap was meant to also keep responses under per-tool size/timeout limits on some MCP hosts — that concern is real, but only for very large MCCs. For typical agencies running 50-150 client accounts, the cap was just hiding accounts and forcing users to remember a magic incantation.

What changed

  • Default raised to 200 in list_accounts (both the implementation in src/adloop/ads/read.py and the MCP tool wrapper in src/adloop/server.py).
  • Truncation note is actionable, not vague. Old: "Call list_accounts with a higher limit." New: "If the user asked to see all of their accounts, call this tool again with a much higher limit (e.g. list_accounts(limit=1000)). If you only need one specific account, skip listing entirely and pass customer_id directly to get_campaign_performance, run_gaql, or whichever tool you actually need." LLMs follow concrete instructions; they ignore vague ones.
  • Tool docstring updated with the same explicit fallback so agents see the override path in the tool schema, not just post-hoc.
  • The cap itself stays. Very large MCCs (300+ accounts) can still hit host-side response-size or per-tool-call timeouts — independent of the SDK race — and the right move there is for the caller to ask for a bigger page on purpose.

Verification

145 unit tests pass (uv run pytest), including three new ones covering the new default, the new truncation note shape, and the explicit-limit-overrides-default path (verifying that the underlying GAQL probe correctly requests LIMIT {limit + 1}).

Install / upgrade

pipx upgrade adloop        # or
pip install --upgrade adloop
# or on-demand:
uvx adloop@0.6.5

Then restart your MCP host (Claude Desktop, Cursor, Claude Code, Cowork, etc.).

If you have a 200+ account MCC and want every account in a single response, just ask your agent for "all of my accounts" — it'll see the new truncation note and call list_accounts(limit=1000) (or similar) on its own.

Credits

Thanks to a Cowork agency user who flagged that 50 was hiding most of their book — exactly the regression we needed to know about. The original 166-account MCC report that motivated v0.6.3 still applies: the cap protects them from a real failure mode, just not at 50.

Full Changelog: v0.6.4...v0.6.5