Skip to main content
Glama

Get the GA4 pattern for AI traffic

get_ai_traffic_setup
Read-onlyIdempotent

Get the regular expression that matches visits sent by AI assistants (ChatGPT, Perplexity, Claude, Gemini, Copilot and others) for Google Analytics 4, with the steps to add an AI channel and what the numbers miss. Answers from what you send alone: nothing is fetched or stored.

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

Input Schema

NameRequiredDescriptionDefault
extraNoOther AI sites to include. Host names, separated by commas. Leave empty for the standard list. Optional.

Output Schema

NameRequiredDescriptionDefault
toolYes
toolUrlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety bar is largely met structurally. The description still adds real value by stating that the answer is derived from the inputs alone with nothing fetched or stored, and by flagging that the numbers have known gaps ('what the numbers miss').

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?

One front-loaded sentence opening with the verb and resource, followed by the computation caveat. It is dense but every clause carries information; the middle clause about 'steps to add an AI channel' is slightly tangential to the core regex output.

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 one-optional-parameter, read-only generator with an output schema, the description covers what it produces, what it computes from, and a caveat on accuracy. Nothing essential is missing, though it does not note the output format or limits on the customized list.

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 100% and the single optional 'extra' parameter is fully documented in the schema. The description adds nothing about that parameter, so it neither compensates for nor duplicates schema meaning — the baseline 3 applies.

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 and resource: returns the regular expression matching AI-assistant visits for Google Analytics 4, and enumerates the covered assistants (ChatGPT, Perplexity, Claude, Gemini, Copilot). This clearly separates it from siblings such as check_ai_visibility or generate_ai_robots_txt, which address different artifacts.

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 usage context is implied rather than stated: an agent can infer it is the tool for producing a GA4 filter pattern, and the closing clause clarifies it computes locally rather than fetching data. However, there is no explicit statement of when to prefer it over near-neighbors like get_report or check_ai_visibility, and no exclusions.

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