Skip to main content
Glama

GSCPAP - Google Search Console, GA4, Bing Webmaster Tools & PageSpeed MCP

GA4 events by name

ga4_events_by_name
Read-only

Event-level breakdown over the last N days. Use for scroll depth, outbound clicks, file downloads, custom events.

Default returns one row per event_name with eventCount + totalUsers. Pass group_by_page=True to also slice by pagePath (great for "what % of homepage visitors scrolled to 90%?"). Pass event_name_filter="scroll" to focus on a single event family.

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": {
      "property_id": "<property_id>"
    },
    "name": "ga4_events_by_name"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNolookback window (1-365), default 28
limitNomax rows (1-1000), default 50
intentNoOptional: the user's goal in a few words. No site names or URLs.
end_dateNooptional YYYY-MM-DD. Alone, the window is `days` days ending on this date
start_dateNooptional YYYY-MM-DD. With it the window is start_date to end_date (or today), and days is ignored
property_idYesGA4 property id (numeric or "properties/XYZ")
group_by_pageNoif True, also slice by pagePath
event_name_filterNoif set, only return rows for this event_name

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / intent
      Added value: +{
      +  "description": "Optional: the user's goal in a few words. No site names or URLs.",
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / end_date
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "optional YYYY-MM-DD. Alone, the window is `days` days\nending on this date"
      +}
    • addedInput schema / properties / start_date
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "optional YYYY-MM-DD. With it the window is start_date\nto end_date (or today), and days is ignored"
      +}
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, openWorldHint, destructiveHint=false), so this only needs to add context, and it does: it discloses the default grain ('one row per event_name with eventCount + totalUsers') and how group_by_page changes the shape of the result. It doesn't mention row limits/truncation behavior at the 1000-row cap, which would be the remaining behavioral risk.

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?

Four short sentences, front-loaded with the purpose before the parameter hints, with no filler. Slight fragmentation from the line-broken sentences, but every clause carries information.

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 an 8-parameter read tool with full schema coverage, an output schema, and annotations, the description covers purpose, default output grain, and the two non-obvious toggles. Completeness would be better if it noted the interaction between limit and result truncation, since that affects how an agent should set the row cap.

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 baseline of 3 applies; the schema already documents days, limit, start_date, and end_date including the precedence rule. The description's added value is limited to a usage example for group_by_page and a suggested filter value ('scroll'), which is helpful but does not extend to the date-window or limit parameters.

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 ('Event-level breakdown over the last N days') and enumerates the concrete analysis cases it serves (scroll depth, outbound clicks, file downloads, custom events). That enumeration distinguishes it cleanly from siblings like ga4_top_pages, ga4_engagement, or ga4_conversions_by_source without needing to name them.

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?

It gives clear when-to-use signals through the use-case list and explains two conditional modes in one line each ('Pass group_by_page=True to...', 'Pass event_name_filter="scroll" to...'). What's missing is any when-not-to-use guidance or an explicit pointer to a sibling (e.g. ga4_top_pages) for the page-level alternative.

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.