Skip to main content
Glama

Get Traffic Breakdown

get_breakdown
Read-only

Top-N breakdown of a site's traffic by one dimension. regions needs country (ISO alpha-2); cities needs country and takes region. countries / regions / cities ignore the page, referrer, campaign, event and goal filters (they are the country-scoped views themselves).

Input Schema

NameRequiredDescriptionDefault
toNo
daysNo
fromNo
siteYes
limitNo
regionNoRegion name as dimension=regions returns it (cities)
countryNoISO 3166-1 alpha-2, required for regions and cities
filtersNoNarrow the report to the visits that match ALL of these (the dashboard's click-to-filter), inside the same window as the report. Omit for everything.
dimensionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / country
      Added value: +{
      +  "description": "ISO 3166-1 alpha-2, required for regions and cities",
      +  "type": "string"
      +}
    • changedInput schema / properties / dimension / enum
      Previous value: -[
      -  "pages",
      -  "referrers",
      -  "countries",
      -  "devices",
      -  "browsers",
      -  "os",
      -  "dates",
      -  "keywords",
      -  "products",
      -  "redirects",
      -  "campaigns"
      -]New value: +[
      +  "pages",
      +  "referrers",
      +  "countries",
      +  "regions",
      +  "cities",
      +  "devices",
      +  "browsers",
      +  "os",
      +  "dates",
      +  "keywords",
      +  "products",
      +  "redirects",
      +  "campaigns"
      +]
    • addedInput schema / properties / filters
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Narrow the report to the visits that match ALL of these (the dashboard's click-to-filter), inside the same window as the report. Omit for everything.",
      +  "properties": {
      +    "browser": {
      +      "description": "Browser name as get_breakdown dimension=browsers lists it",
      +      "type": "string"
      +    },
      +    "campaign": {
      +      "description": "utm source|medium|campaign exactly as a get_breakdown dimension=campaigns row; an empty part matches any, e.g. newsletter||",
      +      "type": "string"
      +    },
      +    "country": {
      +      "description": "ISO 3166-1 alpha-2 code, e.g. US; several joined with |, e.g. US|DE",
      +      "type": "string"
      +    },
      +    "device": {
      +      "description": "Device class as get_breakdown dimension=devices lists it (desktop, mobile, tablet)",
      +      "type": "string"
      +    },
      +    "event": {
      +      "description": "Visits that fired this custom event name (get_events lists the names)",
      +      "type": "string"
      +    },
      +    "goal": {
      +      "description": "Visits that completed this saved goal, by the id get_goals returns",
      +      "type": "string"
      +    },
      +    "os": {
      +      "description": "Operating system as get_breakdown dimension=os lists it",
      +      "type": "string"
      +    },
      +    "page": {
      +      "description": "Visits that viewed this page path, e.g. /pricing",
      +      "type": "string"
      +    },
      +    "referrer": {
      +      "description": "Visits that arrived from this referrer host, e.g. google.com",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / region
      Added value: +{
      +  "description": "Region name as dimension=regions returns it (cities)",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / dimension / enum
      Previous value: -[
      -  "pages",
      -  "referrers",
      -  "countries",
      -  "devices",
      -  "browsers",
      -  "os",
      -  "dates",
      -  "keywords",
      -  "products",
      -  "redirects"
      -]New value: +[
      +  "pages",
      +  "referrers",
      +  "countries",
      +  "devices",
      +  "browsers",
      +  "os",
      +  "dates",
      +  "keywords",
      +  "products",
      +  "redirects",
      +  "campaigns"
      +]
  3. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description earns credit for disclosing a non-obvious behavior: the countries/regions/cities dimensions silently ignore the page, referrer, campaign, event and goal filters. It does not disclose defaults for the date window (from/to vs days), the limit default, or whether absent dimensions return empty results.

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?

Three dense sentences, front-loaded with the core purpose, and the dimension prerequisites precede the filter-caveat elaboration. The parenthetical about country-scoped views is slightly awkward but carries real information, so nothing is wasted.

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

Completeness3/5

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

For a 9-parameter tool with a nested filters object, an enum, and no output schema, the description covers the trickiest interactions but leaves the date-window parameters and result limit unaddressed. An agent can call it, but may guess wrong on the time range and row count.

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

Parameters3/5

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

Schema description coverage is only 33%, so the description must compensate and does so selectively: it explains country/region coupling to dimensions and the filter-ignore rule. However site, dimension, limit, days, from, and to are left entirely unexplained in both places, so the two required parameters and the result-size control are undocumented.

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?

States a specific verb+resource pair ('Top-N breakdown of a site's traffic by one dimension') and names the dimension enum as the axis of variation, which is more specific than the sibling list_sites/get_stats names. It does not, however, say how this differs from get_stats, get_timeseries, get_paths, or get_visitors, which all sound like traffic reporting too.

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

Usage Guidelines3/5

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

The description gives real conditional rules for dimension-specific parameters ('regions needs country; cities needs country and takes region'), which is genuine usage guidance. But there is no statement of when to reach for this tool versus get_stats or get_paths, and no note that exactly one dimension is broken down at a time or how many rows are returned.

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