Skip to main content
Glama

Get an analytics time series

websiteAnalytics_timeseries_get
Read-onlyIdempotent

Returns one traffic time series bucketed by unit (year, month, day, hour, or minute). series selects which: pageviews returns parallel pageviews and sessions arrays with one point per time bucket (and accepts compare — prev or yoy — to request comparison data for the previous period or year), while events returns tracked custom-event counts as one events point per event name per time bucket. Only the requested series' fields are present in the response. startAt and endAt are Unix epoch milliseconds; timezone is an IANA name (e.g. America/New_York) that controls bucket boundaries; optional filter parameters narrow the data. The series is capped to the most recent maxPoints time buckets (default 30, max 500); a truncated field reports when the cap was applied. Requires a plan that includes analytics (403 otherwise); empty until the website is published and has traffic.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "websiteId": "<websiteId>",
      "startAt": "<startAt>",
      "endAt": "<endAt>",
      "unit": "<unit>",
      "series": "<series>"
    },
    "name": "websiteAnalytics_timeseries_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
osNo
tagNo
cityNo
pathNo
unitYes
endAtYes
eventNo
queryNo
titleNo
cohortNo
deviceNo
regionNo
seriesYesWhich time series to return: `pageviews` for page views and sessions per bucket, `events` for tracked custom-event counts per event name per bucket.
browserNo
compareNoRequest comparison data alongside the primary series: `prev` for the previous period, `yoy` for the same range one year earlier. Only valid when `series` is `pageviews`.
countryNo
segmentNo
startAtYes
utmTermNo
hostnameNo
languageNo
referrerNo
timezoneNo
maxPointsNo
utmMediumNo
utmSourceNo
websiteIdYes
distinctIdNo
utmContentNo
utmCampaignNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover the read-only/idempotent safety profile, and the description adds real behavioral context beyond them: a 403 without an analytics plan, empty results until the site is published and receives traffic, timezone determining bucket boundaries, the `maxPoints` cap and the `truncated` flag reporting when it triggered. It also discloses that only the requested series' fields are present, which prevents null-field misreads.

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 the return shape and the `series` switch, then timing/bucketing semantics, then the cap, then prerequisites — a sensible information order with no filler sentences. It is dense near the limit of one paragraph, but every clause carries information the agent needs.

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 describing the response shape precisely: parallel `pageviews`/`sessions` arrays, one `events` point per event name per bucket, and a `truncated` field. Combined with the permission and empty-data caveats, an agent has what it needs to call and interpret the result correctly.

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 coverage is only 7%, so the description carries the burden and does well for the high-stakes parameters: `unit` enum, `series` semantics, `compare` values and validity constraint, epoch-millisecond `startAt`/`endAt`, IANA `timezone`, and `maxPoints` default/max. However, the roughly twenty filter parameters (`cohort`, `segment`, `distinctId`, `utm*`, `path`, etc.) are collapsed into 'optional filter parameters narrow the data', leaving the agent unable to tell what each filters on or whether they combine.

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 ('Returns one traffic time series bucketed by `unit`') and enumerates the exact two output shapes selected by `series`. The word 'time series' plus the bucketing semantics distinguishes it cleanly from the sibling websiteAnalytics_query_get (aggregate query) and websiteAnalytics_realtime_get (live).

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 clear conditional guidance inside the tool: `pageviews` for views/sessions, `events` for custom-event counts, and explicitly constrains `compare` to the `pageviews` case. It also names the prerequisite plan and the published-with-traffic precondition. It stops short of routing the agent against the sibling analytics tools, so there is no explicit when-not/alternative statement.

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