Skip to main content
Glama
ga4-gsc-mcp

ga4-gsc-mcp

by kkvlabs

AI assistant traffic

ai_traffic
Read-onlyIdempotent

Measure sessions and engagement from AI assistants like ChatGPT, Perplexity, Claude, Gemini and Copilot, and see their share of total traffic plus top landing pages.

Instructions

How many visits come from ChatGPT, Perplexity, Claude, Gemini and Copilot? GA4 sessions from AI assistant referrers by assistant, share of all sessions, engagement and top landing pages.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ai_traffic"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteNoSite as a domain or Search Console URL, e.g. "example.com" or "sc-domain:example.com". Optional when the credentials see one site.
limitNoRows to return, default 15, max 100.
periodNoNamed date range ending on the last settled day. Default last_28_days.
compareNoCompare with the previous period (default), the same dates last year, or none.
end_dateNoEnd date YYYY-MM-DD. Defaults to the last settled day (Search Console lags 2 to 3 days).
start_dateNoStart date YYYY-MM-DD. Overrides period.
ga4_propertyNoGA4 property ID (numbers only). Optional: found from the site's web stream when left out.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, open-world behavior, so the safety profile is covered. The description adds that output is segmented by assistant with share-of-sessions and engagement metrics, which is meaningful, but it omits behavioral caveats such as AI referral detection being imperfect or the tool's dependence on a configured GA4 property.

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?

Two sentences, front-loaded with the user-facing question followed by the precise data definition. No filler, though the rhetorical question form is slightly less economical than a direct statement would be.

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?

With no output schema, the description usefully enumerates the returned dimensions (per-assistant sessions, share, engagement, top landing pages). Remaining gaps are modest: it does not state the GA4-property prerequisite or data-settling behavior, which matters for correct invocation expectations.

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% with all seven parameters documented and two enums, so the schema carries the parameter burden. The description adds no additional meaning about site vs. ga4_property resolution, period semantics, or comparison behavior beyond what the schema states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific resource and scope: GA4 sessions attributed to AI assistant referrers (ChatGPT, Perplexity, Claude, Gemini, Copilot), broken out by assistant, share of sessions, engagement, and landing pages. It is clearly distinct from a general traffic_sources tool, though it never names a sibling to route against explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The opening question ('How many visits come from ChatGPT...') implies the use case, which is a usable cue, but there is no explicit when-to-use/when-not guidance and no named alternative such as traffic_sources for non-AI referrers.

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