Skip to main content
Glama

Spend by audience and placement

get_audience_breakdown
Read-onlyIdempotent

One ad platform's spend and results split by who saw the ads or where: Meta by age, gender, device, placement or platform; Google by device, age, gender or platform (network). Per row: spend, share (of the split's spend, 0..1), impressions, clicks, conversions, conversionValue, roas and cpa — all as the PLATFORM reports them, so say so. byCampaign repeats the split per campaign; campaigns lists the campaigns with breakdown data (id + name): pass campaignId to read one. coverage = the share of the platform's campaign spend these rows explain (below 1 mostly because Google gives age and gender for Search and Shopping only, never Performance Max). unconverted true = some rows are in a currency with no rate yet and are left out. Null conversions = the platform reported none for that segment, not zero. Optional from and to (inclusive YYYY-MM-DD, both or neither, never after today) read another span instead of the default period. A named month, a week or two dates the operator gave MUST be sent here: without them this reads the last 30 days, which is not that month.

Input Schema

NameRequiredDescriptionDefault
toNoLast day of the span, inclusive, as YYYY-MM-DD; not after today. Send together with `from`, or omit both to read the default 30-day period.
fromNoFirst day of the span, inclusive, as YYYY-MM-DD. Send together with `to`, or omit both to read the default 30-day period.
sourceYesThe ad platform: meta or google.
dimensionYesHow to split the spend. Meta: age, gender, device, placement or platform (Facebook, Instagram, Audience Network, Messenger). Google: device, age, gender or platform (network). none = one row per campaign, no split.
campaignIdNoOne campaign's id, from a first call's campaigns list; omit for every campaign.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description goes well beyond them: coverage is defined as the share of platform campaign spend the rows explain, with the reason it falls below 1 (Google gives age/gender for Search and Shopping only, never Performance Max); unconverted=true flags rows dropped for lack of a currency rate; null conversions means 'not reported', not zero. That is exactly the kind of caveat an agent needs to interpret results honestly.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with what the tool returns, then caveats, then date rules — a sensible order with every clause carrying information. It is dense and semicolon-heavy, and phrases like 'so say so' are informal, but no sentence is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description carries the full burden of describing the return shape — it lists spend, share, impressions, clicks, conversions, conversionValue, roas and cpa, plus byCampaign/campaigns/coverage/unconverted. For a two-platform, six-dimension breakdown tool with date-range semantics, that is complete enough to call correctly on the first try.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real semantics on top: from/to must be sent both or neither and never after today, and crucially that omitting them silently yields the last 30 days. It also explains the campaignId provenance (from a prior call's campaigns list). Only the dimension enum is left entirely to the schema, which already handles it well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource: 'spend and results split by who saw the ads or where', then enumerates the valid splits per platform (Meta: age/gender/device/placement/platform; Google: device/age/gender/network). That is unmistakably an ad-spend-by-audience tool rather than a sales or catalogue tool, though it never names a sibling (e.g. get_contribution_breakdown or get_google_product_split) to draw the boundary explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a strong, actionable directive: a named month, week or two dates from the operator MUST be passed here because the default reads the last 30 days and 'is not that month'. It also tells you to pass campaignId to read a single campaign and that campaigns comes from a first call. What is missing is any explicit when-to-use-this-vs-another-tool guidance against the many breakdown siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources