Skip to main content
Glama

AI assistant referrals

analytics_get_ai_referrals
Read-only

GA4 AI / AEO referrals: ChatGPT, Perplexity, Gemini, and similar assistant traffic.

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": "analytics_get_ai_referrals"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo
daysNo
limitNo
actionNo
statusNo
date_toNo
page_idNo
sort_byNo
user_idNo
platformNo
site_urlNo
client_idNo
date_fromNo
ad_accountNo
ig_user_idNo
user_emailNo
window_daysNo
range_presetNo
activity_onlyNo
campaign_nameNo
property_nameNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / platform
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Platform"
      +}
    • addedInput schema / properties / window_days
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Window Days"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / action
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Action"
      +}
    • addedInput schema / properties / status
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Status"
      +}
  3. First observed

TDQS

C2.6/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the description need only add context. It adds one useful scoping fact (which platforms count as AI referrals) but nothing about defaults, pagination, aggregation, or what the report returns for the 21 exposed filters.

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?

A single front-loaded phrase with no filler, and the platform enumeration is efficient. It is a fragment rather than a complete directive, but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return shape need not be described, but for a 21-parameter analytical report the definition says nothing about parameter usage, defaults, or filters. The description is far too thin for the complexity of the call surface.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Twenty-one optional parameters with 0% schema description coverage and zero mention in the description. The agent gets no way to tell url vs site_url vs property_name, or what action, status, platform, range_preset, and window_days mean here, so the description does none of the compensating work required.

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?

The description names a concrete resource — GA4 AI/AEO referral traffic — and enumerates the source platforms (ChatGPT, Perplexity, Gemini), so an agent knows it retrieves assistant-originated referral data. It stops short of a verb ('retrieve'/'list') and never distinguishes itself from close siblings such as analytics_get_traffic_sources or search_get_ai_visibility.

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

Usage Guidelines2/5

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

There is no when-to-use statement, no prerequisite (e.g., needs a GA4 property), and no named alternative for adjacent questions. The only guidance is implied by the phrase 'AI referrals', leaving the agent to infer selection vs traffic_sources or AI-visibility tools.

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.