Skip to main content
Glama

Campaigns

get_campaigns
Read-onlyIdempotent

Every ad campaign (Meta, Google and the other ad platforms) over the period, largest spend first, with largestFalls and largestRises already ranked by the change in what the platform claims (compare for last year, or compareFrom and compareTo): spend, the revenue the PLATFORM claims for it (claimedRevenue) and roas (claimedRevenue ÷ spend), with the previous period's spend, claim and ROAS beside them (priorSpend, priorClaimedRevenue, priorRoas; null when comparable is false). Claims are each platform's own and overlap — never add them up into store revenue. name null = the campaign was never named in the sync, quote its id. Use for 'which campaigns spend the most', 'best and worst campaigns', 'how did campaign X do'. For Nuira's own attribution per campaign use get_sales; for Google products inside Shopping and Performance Max use get_google_product_split. 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 default period (the one on the operator's screen, else the last 30 days), which is not that month. When the operator names no period, send neither.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_campaigns"
  }
}

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 period: the one on the operator's screen when the message names it, else the last 30 days.
fromNoFirst day of the span, inclusive, as YYYY-MM-DD. Send together with `to`, or omit both to read the default period: the one on the operator's screen when the message names it, else the last 30 days.
compareNoWhat to compare the span with: previous (default, the same number of days just before), yoy (the same dates last year) or yoyWeekday (52 weeks back, the same weekdays — use it for natural Monday–Sunday weeks or whenever the operator says 'last year' over weeks).
compareToNoLast day of the named comparison period, YYYY-MM-DD.
compareFromNoFirst day of a NAMED comparison period, YYYY-MM-DD, with compareTo. For 'September with October': from/to October, compareFrom/compareTo the whole of September. Takes the place of compare.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / from / description
      Previous value: -"First day of the span, inclusive, as YYYY-MM-DD. Send together with `to`, or omit both to read the default 30-day period."New value: +"First day of the span, inclusive, as YYYY-MM-DD. Send together with `to`, or omit both to read the default period: the one on the operator's screen when the message names it, else the last 30 days."
    • changedInput schema / properties / to / description
      Previous value: -"Last 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."New value: +"Last day of the span, inclusive, as YYYY-MM-DD; not after today. Send together with `from`, or omit both to read the default period: the one on the operator's screen when the message names it, else the last 30 days."
  2. Changed3 schema fields changed
    • addedInput schema / properties / compare
      Added value: +{
      +  "description": "What to compare the span with: previous (default, the same number of days just before), yoy (the same dates last year) or yoyWeekday (52 weeks back, the same weekdays — use it for natural Monday–Sunday weeks or whenever the operator says 'last year' over weeks).",
      +  "enum": [
      +    "previous",
      +    "yoy",
      +    "yoyWeekday"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / compareFrom
      Added value: +{
      +  "description": "First day of a NAMED comparison period, YYYY-MM-DD, with compareTo. For 'September with October': from/to October, compareFrom/compareTo the whole of September. Takes the place of compare.",
      +  "format": "date",
      +  "type": "string"
      +}
    • addedInput schema / properties / compareTo
      Added value: +{
      +  "description": "Last day of the named comparison period, YYYY-MM-DD.",
      +  "format": "date",
      +  "type": "string"
      +}
  3. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds real behavioral context beyond that: the result is pre-sorted by spend, prior* fields are null when comparable is false, name null means the campaign was never named (quote its id), and platform claims overlap so they must never be summed into store revenue — a critical misuse guard. It does not mention pagination or result-count limits.

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 the resource and ordering, then the caveats, then alternative routing, then period handling — a logical order with no filler sentences. It is still a long, dense single paragraph, and the default-period explanation is repeated on top of near-identical schema text, which costs a point.

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?

No output schema exists, so the description carries the return-shape burden and does it: it names spend, claimedRevenue, roas and the prior* counterparts, defines roas as claimedRevenue ÷ spend, and explains null semantics. Combined with the period and overlap caveats, an agent has everything needed to call it correctly and interpret the result.

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; the description earns a point by adding the from/to coupling rule (both or neither, never after today) and framing compare/compareFrom/compareTo as the 'named comparison period' path in operator terms. However, its parenthetical that `compare` means 'for last year' oversimplifies a three-value enum whose default is `previous`, and the September-with-October example largely restates the schema.

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

Purpose5/5

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

States a specific verb and resource (every ad campaign across Meta, Google and other platforms over a period), plus the exact ordering (largest spend first) and the ranked extras (largestFalls, largestRises). It also names the sibling it is not (get_sales for Nuira attribution, get_google_product_split for Google product splits), so an agent can route without opening a schema.

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

Usage Guidelines5/5

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

Gives literal operator phrasings this tool answers ('which campaigns spend the most', 'best and worst campaigns', 'how did campaign X do') and two explicit exclusions pointing at named alternatives. It also states the period rule in both directions: a named month/week/two dates MUST be sent here, and when no period is named send neither — the strongest possible when/when-not framing.

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