Skip to main content
Glama

ADS MCP

Get Campaign Stats

get_campaign_stats
Read-only

Performance metrics for campaigns: impressions, clicks, CTR, cost, conversions, avg CPC, Impr.(Abs.Top)%. Default: LAST_30_DAYS. Use date_range for a named period, or date_from + date_to (YYYY-MM-DD) for any custom period such as a specific month. Set compare_previous_period=true to also fetch the immediately preceding period of equal length with deltas/percent change per metric; for a comparison against a specific different period (e.g. Nov vs Oct) also pass compare_date_from + compare_date_to.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "user_intent": "<user_intent>"
    },
    "name": "get_campaign_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
date_toNoCustom end date YYYY-MM-DD, inclusive.
date_fromNoCustom start date YYYY-MM-DD (use with date_to, instead of date_range).
date_rangeNoTODAY, YESTERDAY, LAST_7_DAYS, LAST_14_DAYS, LAST_30_DAYS, THIS_MONTH, LAST_MONTH, THIS_WEEK_MON_TODAY, LAST_WEEK_MON_SUN, THIS_QUARTER, LAST_QUARTER. Not combinable with date_from/date_to.
campaign_idNo
customer_idNo
user_intentYes
compare_date_toNoOptional explicit comparison period end YYYY-MM-DD, inclusive.
compare_date_fromNoOptional explicit comparison period start YYYY-MM-DD (requires compare_previous_period=true and compare_date_to).
compare_previous_periodNoIf true, also returns the immediately preceding period of equal length (e.g. for LAST_30_DAYS, the 30 days before that) plus per-metric delta and percent change, both at the account-total level and per campaign.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already establish readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds genuinely useful behavior: LAST_30_DAYS is the default, and comparisons return both account-total and per-campaign deltas with percent change. It still says nothing about pagination, aggregation granularity, or whether a missing campaign_id fans out to all campaigns.

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?

The first clause front-loads the returned metrics, followed by the default period and then parameter-combination rules in a logical order. It is dense with no filler, but the long single paragraph of date/comparison instructions would read faster if split or bulleted.

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

Completeness4/5

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

Because there is no output schema, the description must carry the return-value burden, and it does so by listing the metrics and explaining that comparison mode adds per-metric delta and percent change at both account and campaign level. What is missing is the meaning of campaign_id, customer_id, and user_intent, which matter for a 9-parameter tool with only 1 required field.

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?

With 67% schema coverage, the schema already documents date_to, date_from, date_range, compare_date_to, compare_date_from, and compare_previous_period, and the description reinforces their relationships (mutual exclusivity of date_range vs date_from/date_to, and that compare_date_from requires compare_previous_period=true plus compare_date_to). The paraphrase adds real pairing and dependency logic rather than repeating the schema, though campaign_id, customer_id, and user_intent remain unexplained anywhere.

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?

The description names the specific resource (campaigns) and enumerates the exact metrics returned (impressions, clicks, CTR, cost, conversions, avg CPC, Impr.(Abs.Top)%), which clearly separates it from stats tools like get_keyword_stats. It stops short of explicitly naming a sibling or stating scope boundaries, so it is strong but not maximally differentiating.

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?

It gives concrete selection rules: use date_range for a named period, date_from + date_to for a custom period such as a specific month, compare_previous_period=true for the preceding equal-length period, and compare_date_from + compare_date_to for an arbitrary comparison period like Nov vs Oct. That covers when to use each parameter combination, though it says nothing about when to prefer this tool over related stats tools.

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.