Skip to main content
Glama

Ask a question about a site's traffic

query_site_analytics
Read-onlyIdempotent

Answer ANY website traffic question the fixed summary does not cover, by building the report yourself: pick metrics, up to 3 breakdowns, filters, a window and an optional comparison. Examples: organic search visits day by day → breakdown ["date"], filters [{dimension:"channel", value:"Organic Search"}]; this month vs last month → start_date/end_date with compare "previous_period"; mobile vs desktop bounce rate → breakdown ["device"], metrics ["sessions","bounce_rate"]; which pages Instagram visitors land on → breakdown ["landing_page"], filters [{dimension:"source", value:"instagram", match:"contains"}]; busiest weekday or hour → breakdown ["weekday"] or ["hour"]; traffic by week per channel → breakdown ["week","channel"]; visits to one page over time → breakdown ["date"], filters [{dimension:"page", value:"/pricing"}]; conversions by source → metrics ["conversions"], breakdown ["source_medium"]. Channel values are names like "Organic Search", "Organic Social", "Direct", "Referral", "Paid Search", "Paid Social", "Email", "AI Assistant". Presets end yesterday (complete days) unless include_today is true. compare cannot be combined with a date, week or month breakdown. Rows come back with totals; the total visitor count counts each person once. Requires analytics to be enabled on the site. If a combination is rejected, the error says why: adjust and ask again rather than telling the user the data is unavailable.

Input Schema

NameRequiredDescriptionDefault
limitNo
periodNoPreset window ending yesterday (default last_28_days)
compareNoAlso read the previous period or the same window a year earlier
filtersNoFilters, all must hold
metricsNoWhat to count (default visitors and sessions)
site_idYesThe site, from list_sites
end_dateNoWindow end, YYYY-MM-DD, inclusive
order_byNoA metric or breakdown in this question to sort by
ascendingNo
breakdownNoUp to 3 ways to split the numbers, in order
user_goalNoOptional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details.
start_dateNoWindow start, YYYY-MM-DD (with end_date)
include_todayNoSlide a preset to end today

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only cover read-only/idempotent/non-destructive; the description adds substantive behavior: presets end yesterday unless include_today is true, compare/breakdown incompatibility, rows return totals, the visitor count dedupes people, an analytics-enabled prerequisite, and a self-correcting error contract. These are the non-obvious traits that actually change how an agent constructs a call.

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-loads the core directive before the examples, and each example teaches a distinct mapping rather than restating the schema. It is dense but dense with usable patterns; the eight worked examples plus enum listing make it longer than strictly necessary for an already well-documented schema.

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?

For a 13-parameter, no-output-schema tool this covers the important ground: window defaults, comparison limits, filter/breakdown interplay, result shape in brief, and failure recovery. Minor omissions remain around limit/pagination behavior and what user_goal does with the call, which the schema partially covers.

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 already 85%, so the baseline is 3; the description still adds real meaning beyond it, notably the actual channel value strings ('Organic Search', 'Organic Social', 'AI Assistant'), the idea that breakdown order matters, and worked examples tying intent to metric/breakdown/filter combinations. It leaves limit, order_by, and user_goal largely to their schema text, so it stops short of full compensation.

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+resource ('Answer ANY website traffic question ... by building the report yourself') and explicitly positions itself against a sibling-like capability: the fixed summary it does not replace. An agent can immediately tell this is the flexible analytics query tool rather than a get_site/get_growth_dashboard style summary.

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 explicit when-to-use ('questions the fixed summary does not cover'), concrete when-to-use-which-shape examples mapped to parameters, hard exclusions ('compare cannot be combined with a date, week or month breakdown'), and prerequisites ('Requires analytics to be enabled on the site'). It also tells the agent what to do on rejection instead of giving up, which is exactly the routing guidance a caller needs.

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