Skip to main content
Glama

Campaigns

list_campaigns
Read-onlyIdempotent

Visitors from links tagged with utm_campaign or utm_source, grouped by utm_campaign, utm_source and utm_medium of their first page view that day, paged, with top utm_content, utm_term and landing pages; total_visitors is all of them. No data before sources_from. goal adds a goal's conversions per row: read goal_note. get_campaign_goals: every goal's steps for one row. Dates are the project's calendar days, YYYY-MM-DD (timezone: get_project); timestamps are UTC. Omit from/to for the last 28 complete days, ending yesterday. Today is still in progress: a range including it reads as a drop against complete days. unique_sessions (visitors) is approximate: counted per day from a daily-rotating hash and summed over days, so a returning visitor counts once per day, and shared or changing networks merge or split people.

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": "list_campaigns"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoLast day, YYYY-MM-DD in the project's timezone, inclusive. Default: yesterday, the last complete day.
fromNoFirst day, YYYY-MM-DD in the project's timezone, inclusive. Default: 27 days before 'to'.
goalNoA goal's funnel ID (list_funnels, is_goal true). Adds goal numbers to every row (conversions, conversion_rate, and revenue and revenue_per_visitor when the goal has a value), plus goal and goal_totals. Read goal_note before quoting them. Not a goal: 404.
pageNoPage number, from 1.
limitNoCampaigns per page, 1-100. Default 50.
traitNoOnly count visitors carrying this session trait value.
searchNoCase-insensitive substring of the campaign, source, medium, or any utm_content or utm_term.
projectNoProject ID, from list_projects. Required when this connection covers more than one project; may be left out when it covers one (and with an API key, which belongs to one project).
sort_byNovisitors (default) or campaign; with goal also conversions, conversion_rate, revenue or revenue_per_visitor (rows without a value last).
sort_dirNodesc or asc. Default: desc, asc for campaign.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / goal
      Added value: +{
      +  "description": "A goal's funnel ID (list_funnels, is_goal true). Adds goal numbers to every row (conversions, conversion_rate, and revenue and revenue_per_visitor when the goal has a value), plus goal and goal_totals. Read goal_note before quoting them. Not a goal: 404.",
      +  "type": "string"
      +}
    • changedInput schema / properties / sort_by / description
      Previous value: -"visitors (default) or campaign."New value: +"visitors (default) or campaign; with goal also conversions, conversion_rate, revenue or revenue_per_visitor (rows without a value last)."
    • addedInput schema / properties / sort_dir
      Added value: +{
      +  "description": "desc or asc. Default: desc, asc for campaign.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already establish read-only, idempotent, closed-world behavior, so the bar is low, yet the description adds substantial non-obvious context: there is no data before sources_from, a range including today reads as a drop against complete days, and unique_sessions is approximate because it is counted per day from a daily-rotating hash and summed. The hash-based visitor-merging caveat is exactly the kind of accuracy warning an agent could not infer from annotations or schema.

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

Conciseness3/5

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

It is front-loaded with the core definition and almost every clause carries information, but it is delivered as one dense run-on paragraph mixing data model, date rules, cross-references, and accuracy caveats. Splitting those into short sentences or a small structure would make the same content markedly easier to scan.

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?

With 10 optional parameters, no output schema, and no enums, the description carries a heavy burden and mostly meets it: it covers what rows contain (top utm_content, utm_term, landing pages), pagination, date defaults, timezone, and visitor approximation. It does not enumerate the full row shape (e.g., the per-campaign metric fields besides total_visitors), which keeps it from a 5.

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% and the parameter descriptions already explain defaults and formats, so the baseline is 3. The description still adds meaning on top: it clarifies that total_visitors is all visitors including those without a goal, that goal figures require reading goal_note, and that dates are project calendar days with timestamps in UTC (timezone via get_project).

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 opening clause names the specific population (visitors from links tagged with utm_campaign or utm_source) and the grouping keys (utm_campaign, utm_source, utm_medium of first page view that day), which is far more precise than a restated title. It implicitly separates itself from aggregate tools like get_overview or list_sources, but never explicitly names the sibling it would be confused with, so it stops short of a 5.

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 operating guidance: omit from/to for the last 28 complete days ending yesterday, read goal_note before quoting goal numbers, and use get_campaign_goals for a single row's goal steps. What it lacks is any explicit exclusion — nothing says when to use list_sources or get_overview instead of this tool.

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