Skip to main content
Glama
leonardosepulvedat

MCP Google Analytics Server

ga_send_refund

Send refund events to Google Analytics 4 to record full or partial ecommerce refunds. Reference the original transaction_id; include item quantities for partial refunds.

Instructions

Send a refund event to Google Analytics.

Ecommerce event for full or partial refunds. Omit 'items' for a full refund; include them (with quantities) for a partial refund. Use the same transaction_id as the original purchase.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsNoRefunded items (only for partial refunds)
valueNoRefunded amount
user_idNo
currencyNoCurrency code
client_idNo
transaction_idYesTransaction ID of the original purchase
user_propertiesNoUser properties (e.g., {subscription_tier: {value: "premium"}})

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv1.3.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already indicate this is a non-read-only, non-idempotent operation; the description adds useful behavioral context by explaining how the event encodes refund type through items. It does not contradict any annotation and provides meaningful detail beyond the structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences with no filler. The core action is front-loaded, and the full/partial refund distinction is delivered in compact, immediately actionable form.

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?

Given the absent output schema and moderate parameter complexity, the description covers the key invocation decision (full vs partial) and the critical transaction_id constraint. Minor omissions like explicit guidance on optional value/currency handling are adequately covered by the schema descriptions.

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

Parameters4/5

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

The description clarifies the most important parameter semantics: the conditional role of 'items' in distinguishing full from partial refunds and the requirement to match the original transaction_id. Schema coverage is 71%, and the description meaningfully compensates for the central ambiguity even though it does not elaborate on user_id or client_id.

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?

The description opens with a specific verb and resource: 'Send a refund event to Google Analytics.' It clearly identifies the tool as an ecommerce refund event and distinguishes it from sibling event tools by describing full vs partial refund behavior.

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 concrete usage instructions: omit 'items' for a full refund, include them with quantities for a partial refund, and reuse the same transaction_id as the original purchase. It does not explicitly name alternative tools or when not to use this one, so it stops short of a 5.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/leonardosepulvedat/mcp-google-analytics'

If you have feedback or need assistance with the MCP directory API, please join our Discord server