Skip to main content
Glama
clamp-sh

Clamp Analytics MCP Server

Official

traffic.breakdown

Read-only

Break down web traffic by dimensions like page paths, referrers, geography, devices, or UTM tags. Aggregate visitors and pageviews, filter by criteria, and sort by volume.

Instructions

Aggregate visitors and pageviews grouped by a single dimension. The dimension parameter chooses what to group by — page paths, traffic sources, geography, devices, or marketing attribution. Results are sorted by visitors descending and capped by limit (default 10, max 50). Some dimensions return additional joined columns: dimension="referrer_host" includes the channel for each referrer; dimension="city" includes the ISO country code. All other dimensions return only {name, pageviews, visitors}. Filters narrow the set before aggregation.

Examples:

  • "top pages last week" → dimension="pathname", period="7d"

  • "who is sending traffic" → dimension="referrer_host"

  • "mobile vs desktop split" → dimension="device_type"

  • "best UTM campaigns" → dimension="utm_campaign"

  • "top cities in Germany" → dimension="city", country="DE"

  • "browser version distribution" → dimension="browser_version"

Limitations: aggregates pageview events only — for custom event breakdowns use events.list with group_by. The name column is the raw stored value (lowercase ISO codes for country, exact pathname strings including trailing slash). Per-page time-on-page or bounce rate is not included here — use pages.engagement for that.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoTarget project ID (e.g. "proj_abc123"). Required when the credential has access to multiple projects. If omitted and only one project is accessible, that project is used automatically. Call `projects.list` to discover available project IDs.
dimensionYesWhat to group by. Page paths: "pathname", "entry_page", "exit_page". Traffic sources: "referrer_host" (returns channel too), "channel", "utm_source", "utm_medium", "utm_campaign", "utm_content", "utm_term". Geography: "country", "region", "city" (returns country too). Devices: "device_type", "browser", "browser_version", "os", "os_version".
periodNoTime period. Use "today", "yesterday", "7d", "30d", "90d", or a custom range as "YYYY-MM-DD:YYYY-MM-DD" (e.g. "2026-01-01:2026-03-31"). Defaults to "30d".
limitNoMax rows to return (1-50). Defaults to 10.
pathnameNoFilter to a specific page path (e.g. "/pricing", "/blog/my-post"). Must start with /.
utm_sourceNoFilter by UTM source (e.g. "google", "twitter", "newsletter"). Case-sensitive, must match the value in the tracking URL.
utm_mediumNoFilter by UTM medium (e.g. "cpc", "email", "social"). Case-sensitive.
utm_campaignNoFilter by UTM campaign name (e.g. "spring-launch", "product-hunt"). Case-sensitive.
utm_contentNoFilter by UTM content (e.g. "hero-cta", "sidebar-banner"). Case-sensitive.
utm_termNoFilter by UTM term (e.g. "running+shoes"). Case-sensitive.
referrer_hostNoFilter by referrer hostname (e.g. "news.ycombinator.com", "twitter.com", "github.com"). Use this to see what traffic from a specific source did. Must match the value returned by `traffic.breakdown(dimension="referrer_host")` exactly (lowercase, no protocol or path).
countryNoISO 3166-1 alpha-2 country code, uppercase (e.g. "US", "GB", "DE", "NL", "JP"). Filter results to visitors from this country.
regionNoAdministrative region inside a country (e.g. "California", "Bavaria"). Case-sensitive; must match the stored region exactly. Use traffic.breakdown(dimension="region") to discover values.
cityNoCity name (e.g. "San Francisco", "London"). Case-sensitive; must match the stored value. Use traffic.breakdown(dimension="city") to discover values.
device_typeNoDevice category. One of: "desktop", "mobile", "tablet".
browserNoBrowser family (e.g. "Chrome", "Safari", "Firefox"). Use traffic.breakdown(dimension="browser") to discover the exact stored values.
browser_versionNoBrowser version string (e.g. "120.0"). Case-sensitive.
osNoOperating system family (e.g. "macOS", "iOS", "Windows", "Android"). Use traffic.breakdown(dimension="os") to discover stored values.
os_versionNoOS version string (e.g. "14.2"). Case-sensitive.
channelNoTraffic channel. One of: "direct", "organic_search", "organic_social", "paid", "email", "referral".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYes
Behavior5/5

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

The description adds significant context beyond the readOnlyHint annotation: it explains sorting by visitors descending, limit cap, joined columns for certain dimensions, and the raw format of the name column. It fully discloses behavior without contradiction.

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

Conciseness5/5

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

The description is structured with a clear summary, detailed dimension explanation, result format, examples, and limitations. Every sentence adds value, no redundancy.

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?

Given the full schema coverage, readOnly annotation, and the description covering output shape, limitations, and examples, the tool definition is complete. The lack of an output schema is mitigated by the description specifying return fields.

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%, but the description enriches parameter meaning by grouping dimensions by category (page paths, traffic sources, geography, etc.) and providing example usage. It clarifies the effect of the limit parameter and the extra columns returned for specific dimensions.

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?

The description clearly states the tool aggregates visitors and pageviews grouped by a single dimension. It provides numerous examples covering all dimension categories, and the purpose is distinct from sibling tools like traffic.timeseries and traffic.compare.

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?

The description explicitly mentions when to use alternatives: for custom event breakdowns use events.list with group_by, and for per-page time-on-page use pages.engagement. It implies usage context but could more directly contrast with traffic.overview or traffic.live.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/clamp-sh/mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server