Skip to main content
Glama

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

GA4 conversions by source

ga4_conversions_by_source
Read-only

Conversions and conversion-attributable revenue by traffic source.

Returns currency, time_zone, the date range, and rows with sessionSource + sessionMedium + sessions + conversions + sessionKeyEventRate + totalRevenue + purchaseRevenue (where applicable). Sorted by conversions desc.

Read the rate from sessionKeyEventRate, never by dividing conversions by sessions. A key event is counted every time it fires, so that division exceeds 100% on any property where sessions trigger more than one.

key_events is the same total broken out by event name, and it is the field that keeps an answer honest. A property marks whatever it likes as a key event: on a real shop measured here, 11,611 of them over a month were 6,066 add_to_cart, 2,797 login and 535 logout, against 203 purchases. sessionKeyEventRate for that month was 38.9%, which is true and means "38.9% of sessions did one of ten things, including logging out". The number a merchant means by "conversion rate" was 203/6,625, or 3.1%. Quote the overall rate only with the breakdown beside it, and for a shop prefer transactions and purchaseRevenue.

This used to return the bare row list. Google reports the property's currency and time zone in every response, and taking ["rows"] threw both away, so revenue came back as a bare number: 70114.77 of nothing. It was AUD. The dates had the same problem, since "the last 28 days" is cut in the property's own zone, which for that property is Australia/Melbourne, ten hours off UTC.

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_conversions_by_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNolookback window, default 28
limitNomax rows, default 20
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

Output Schema

NameRequiredDescriptionDefault

No arguments

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

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnly/openWorld/non-destructive, and an output schema exists, so the field inventory adds limited new information. What the description does add is genuinely valuable: the warning that sessionKeyEventRate cannot be recomputed as conversions divided by sessions, and the concrete property where 535 'logout' events counted as key events. That is real behavioral context the schema cannot carry. It does not discuss cost, latency, or failure modes (invalid property id, missing permissions), so it sits above baseline but not at the top.

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?

Purpose and returned fields are front-loaded, and the semantic warning about rate computation is well placed and well argued. The final paragraph is a changelog about how the tool 'used to return the bare row list' – it explains the currency/date fields but reads as release-note history rather than guidance an agent needs.

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 read-only reporting tool with a full-coverage schema and an output schema, the description supplies what structured fields cannot: the meaning of sessionKeyEventRate and the caveat about arbitrary key-event configuration. Gaps are minor – no explicit sibling routing and no note on what happens with an invalid or inaccessible property_id.

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 schema already documents days, limit, start_date/end_date precedence, and intent, so the baseline is 3. The description's note that 'the last 28 days' is cut in the property's own time zone (Australia/Melbourne) adds real interpretative meaning to the date parameters, but it never references days, limit, or intent directly, leaving the gain modest.

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?

Opens with a specific verb+resource+dimension: 'Conversions and conversion-attributable revenue by traffic source.' An agent immediately knows the output grain (sessionSource/sessionMedium). It does not explicitly distinguish itself from siblings like ga4_traffic_sources or ga4_events_by_name, so it stops short of a 5.

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?

Gives metric-selection advice ('for a shop prefer transactions and purchaseRevenue', 'quote the overall rate only with the breakdown beside it'), which implies the tool's intended analysis context. However it never states when to pick this over a sibling report tool or when the result would be the wrong lens for a question.

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.