Skip to main content
Glama

Compare traffic sources

analyze_source_quality
Read-onlyIdempotent

Analyze traffic source quality using aggregate source/UTM metrics and attributed conversion events.

Use when the user asks which referrers, campaigns, UTM sources, mediums, or campaigns are working. Returns source-level pageviews, visitors, CTA clicks, form submits, converting visitors, conversion rate, and attribution coverage summary. It does NOT return raw event logs or form submission payloads. A click or form submit counts toward the referrer or UTM value on the page where it happened, and a visitor who both clicks and submits counts once. "(direct)" means no referrer and "(none)" means no UTM tag; attributionCoverageRate is the share of visitors that have one. Data covers the last 3 months and excludes known bots and vulnerability scanners, the same as get_analytics_summary. Dates are YYYY-MM-DD. When the page took orders in the period and the connection has orders:read, the result adds orders: the orders and revenue by the same source dimension (an order records its UTM source, medium, and campaign, and the referring site). Orders hold no visitor id, so they aren't joined to the visitor rows; revenue counts paid orders (cash on delivery once accepted). Dates are days in the workspace's time zone, UTC when the workspace has none set, and startDate and endDate are whole days in the zone used. Pass timeZone, an IANA name such as America/New_York, for days in another zone; it changes only this response, never the workspace's time zone. The result's timeZone field names the zone used, and timeZoneSource says where it came from (argument, workspace, or default). A row for today's date in that zone counts only the hours so far. When timeZonePending is set, the workspace is switching to that zone once its history is recomputed.

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum source rows to return. Defaults to 20, max 100.
siteIdYesThe ID of the page to analyze
endDateYesEnd date (YYYY-MM-DD)
timeZoneNoIANA time zone name for the days in this response, such as America/New_York, Europe/Berlin, or Asia/Tokyo. Leave it out for the workspace's time zone (UTC when none is set). It affects only this response: the workspace's time zone stays as it is, and only the workspace's owner changes it, in the dashboard's Settings. Abbreviations such as EST and offsets such as +09:00 aren't accepted.
dimensionNoSource dimension to group by. Defaults to referrer.referrer
startDateYesStart date (YYYY-MM-DD)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / siteId / description
      Previous value: -"The ID of the site to analyze"New value: +"The ID of the page to analyze"
  2. Changed1 schema field changed
    • addedInput schema / properties / timeZone
      Added value: +{
      +  "description": "IANA time zone name for the days in this response, such as America/New_York, Europe/Berlin, or Asia/Tokyo. Leave it out for the workspace's time zone (UTC when none is set). It affects only this response: the workspace's time zone stays as it is, and only the workspace's owner changes it, in the dashboard's Settings. Abbreviations such as EST and offsets such as +09:00 aren't accepted.",
      +  "maxLength": 64,
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds substantial context beyond them: attribution counting rules, bot/scanner exclusion, the 3-month window, the conditional orders block gated on orders:read, and timezone resolution including timeZonePending.

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 purpose and usage before the dense behavioral detail, and nearly every sentence carries information. It is long and the timezone paragraph is heavy, but nothing is clearly redundant.

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, and the description compensates by enumerating the returned fields, the conditional orders addition, and the timezone metadata fields (timeZone, timeZoneSource, timeZonePending). An agent has enough to call it 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, but the description adds real meaning: it explains what '(direct)' and '(none)' mean for the dimension values, that timeZone affects only this response and never the workspace setting, and how attributionCoverageRate is computed.

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 ('Analyze traffic source quality using aggregate source/UTM metrics and attributed conversion events') and enumerates the exact output metrics, making it clearly distinct from get_analytics_summary, get_analytics_detail, and query_cta_performance.

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?

Gives an explicit trigger ('Use when the user asks which referrers, campaigns, UTM sources, mediums, or campaigns are working') and an explicit exclusion ('does NOT return raw event logs or form submission payloads'). It does not name sibling tools as alternatives, so it falls short of a 5.

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.