Skip to main content
Glama
leonardosepulvedat

MCP Google Analytics Server

ga_send_add_to_cart

Send add-to-cart ecommerce events to Google Analytics with item details, currency, and value to track shopping behavior and measure cart additions.

Instructions

Send an add to cart event to Google Analytics.

Ecommerce event for tracking when items are added to shopping cart.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesItems added to cart
valueYesTotal value of items added
user_idNo
currencyYesCurrency code
client_idNo
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. Changed20 schema fields changedv1.1.1
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / items / items / additionalProperties
      Added value: +false
    • addedInput schema / properties / items / items / properties / affiliation
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / items / items / properties / coupon
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / items / items / properties / currency
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / items / items / properties / discount
      Added value: +{
      +  "type": "number"
      +}
    • addedInput schema / properties / items / items / properties / index
      Added value: +{
      +  "type": "number"
      +}
    • addedInput schema / properties / items / items / properties / item_brand
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / items / items / properties / item_category
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / items / items / properties / item_category2
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / items / items / properties / item_category3
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / items / items / properties / item_category4
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / items / items / properties / item_category5
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / items / items / properties / item_list_id
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / items / items / properties / item_list_name
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / items / items / properties / item_variant
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / items / items / properties / location_id
      Added value: +{
      +  "type": "string"
      +}
    • changedInput schema / properties / user_properties / additionalProperties
      Previous value: -trueNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "value": {
      +      "type": [
      +        "string",
      +        "number"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "value"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / user_properties / description
      Added value: +"User properties (e.g., {subscription_tier: {value: \"premium\"}})"
  2. First observedv1.0.1

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already indicate the tool is non-read-only, non-idempotent, and non-destructive. The description adds the ecommerce event context but does not disclose additional behavioral traits such as authentication requirements, rate limits, or whether user_id versus client_id is required. There is no contradiction with the annotations.

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?

The description is two short sentences with the key action front-loaded. The second sentence is slightly redundant but adds the valuable ecommerce context, so it earns its place.

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

Completeness3/5

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

For a send-event tool with a rich nested input schema, the description is adequate but lean. It does not explain the relationship between required fields, the role of user_id/client_id, or what the tool returns, and there is no output schema to compensate. The detailed input schema prevents this from being a lower score.

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 67%, so the schema already documents most top-level parameters. The description does not add meaningful semantics beyond what the schema provides; for instance, user_id and client_id remain undocumented, and the description only echoes that items are being added to the cart.

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 clearly states the action ('Send an add to cart event'), the target ('Google Analytics'), and the specific event type. The second sentence reinforces that this is an ecommerce event for cart additions, which differentiates it from purchase, login, signup, and other sibling event tools.

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?

The description gives a clear trigger context: use when items are added to a shopping cart, and it identifies the event as ecommerce. It does not explicitly name alternatives like ga_send_event or ga_send_purchase, but the usage context is clear enough to infer the intended scenario.

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