Skip to main content
Glama

Get analytics performance

get_analytics_performance
Read-only

Returns the Google Analytics 4 numbers of the Analytics page for the site’s connected property: active users, sessions, new users, bounce rate and the number of traffic sources, with the change against the previous period of the same length; a daily series; the 25 top traffic sources and their daily series; the 25 top pages by views; and the 25 top countries. bounceRate and share are fractions from 0 to 1. Keytomic keeps each result for up to 6 hours, so generatedAt says when GA4 was read. For the events of the site, use list_analytics_events.

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": {
      "projectId": "<projectId>"
    },
    "name": "get_analytics_performance"
  }
}

Input Schema

NameRequiredDescriptionDefault
deviceNoOnly sessions on this device category.all
countryNoOnly sessions from this country, as an ISO 3166-1 alpha-2 code such as "US". Omit for every country.
endDateNoLast day, YYYY-MM-DD. Defaults to yesterday.
projectIdYesSite to act on, from list_sites. Only its connected Google Analytics property is used.
startDateNoFirst day, YYYY-MM-DD. Defaults to 28 days ending on endDate, as on the Analytics page.
trafficSegmentNo"organic" keeps sessions from the Organic Search channel. "llm" keeps sessions from AI assistants such as ChatGPT, Perplexity and Gemini.all
comparePreviousPeriodNoAlso read the previous period of the same length, for the deltas. false sets each delta to null.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnly/openWorld/non-destructive, yet the description adds substantive behavior beyond them: results are cached for up to 6 hours, generatedAt indicates when GA4 was actually read, and comparePreviousPeriod changes what deltas contain. It also disambiguates return-value units (bounceRate and share are 0-1 fractions), which no annotation encodes.

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 verb and subject, and the semicolon-delimited enumeration of returned blocks is efficient for a no-output-schema tool. The middle sentence is a long run-on that packs metrics, deltas, series and top-N lists together, which costs some readability but no sentence is filler.

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?

There is no output schema, so the description carries the return-shape burden and does so fully: metrics, deltas, daily series, top 25 sources/pages/countries, value units, and the freshness caveat. Combined with a fully documented 7-parameter schema and explicit sibling routing, an agent has everything needed to call and interpret the result.

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 100%, so the schema already defines device, country, dates, trafficSegment and comparePreviousPeriod, including enum meanings and the default 28-day window. The description adds only the semantic of the deltas ('change against the previous period of the same length') and the caching caveat; it does not add filtering semantics or interaction between date range and cache freshness beyond what the schema states.

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 (Returns) and a specific resource (Google Analytics 4 numbers of the Analytics page for the site's connected property), then enumerates exactly which metrics, series and top-N lists come back. It is clearly distinguishable from siblings such as search_analytics_query and get_search_performance, and explicitly disclaims the events scope.

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?

Names one alternative and the condition that selects it: 'For the events of the site, use list_analytics_events.' That is an explicit routing rule. It does not, however, explain when to prefer this over other performance-oriented siblings (get_search_performance, get_visibility), so it stops short of full when/when-not coverage.

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