Skip to main content
Glama

Scribe Mail

Analytics — conversions & revenue (aggregated events)

get_analytics_events_summary
Read-onlyIdempotent

Aggregated conversion/revenue numbers from recorded events. By DEFAULT a timeseries of event count + sum of value bucketed by granularity: { data:[{period, count, value}], totals:{count, value} }. Set group_by (name | signature_template | marketing_campaign | teammate | anchor | country | currency | user) for a ranked breakdown: { data:[{id, label, count, value}], pagination } — rank by order_by (count | value). value is summed across currencies, so pass currency or group_by=currency for a clean total. Answers total revenue, revenue by campaign/template/teammate/country, conversions per day, top customers (group_by=user).

Input Schema

NameRequiredDescriptionDefault
nameNoRestrict to one event name (e.g. `purchase`).
pageNo1-based page (breakdown only).
limitNoPage size 1–100 (breakdown only).
orderNoSort direction. Default desc.
contextYesExplain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as "a user", "the customer", or "an account". Example: "Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution."
countryNoRestrict to one country (ISO 3166-1 alpha-2).
currencyNoRestrict to one currency (e.g. `USD`) for a clean sum.
end_dateNoRange end (inclusive), ISO-8601 date YYYY-MM-DD. Default: today.
group_byNoRanked breakdown by dimension instead of a timeseries: name | signature_template | marketing_campaign | teammate | anchor | country | currency | user.
order_byNoBreakdown ranking metric: count | value (default count).
start_dateNoRange start (inclusive), ISO-8601 date YYYY-MM-DD. Default: 2 months ago.
distinct_idNoRestrict to one identified visitor (their user id).
granularityNoTimeseries bucket size (default day). Ignored when `group_by` is set.
teammate_idNoRestrict to one teammate (their UUID).
marketing_campaign_idNoRestrict to one marketing campaign (its UUID).
signature_template_idNoRestrict to one signature template (its UUID).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / result / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "data": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "count": {
      -              "maximum": 9007199254740991,
      -              "minimum": -9007199254740991,
      -              "type": "integer"
      -            },
      -            "period": {
      -              "description": "Bucket start as an ISO-8601 UTC instant.",
      -              "type": "string"
      -            },
      -            "value": {
      -              "description": "Sum of event value in the bucket (mixed currencies unless filtered).",
      -              "type": "number"
      -            }
      -          },
      -          "required": [
      -            "period",
      -            "count",
      -            "value"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "granularity": {
      -        "enum": [
      -          "hour",
      -          "day",
      -          "week",
      -          "month"
      -        ],
      -        "type": "string"
      -      },
      -      "time_zone": {
      -        "type": "string"
      -      },
      -      "totals": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "count": {
      -            "maximum": 9007199254740991,
      -            "minimum": -9007199254740991,
      -            "type": "integer"
      -          },
      -          "value": {
      -            "type": "number"
      -          }
      -        },
      -        "required": [
      -          "count",
      -          "value"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "data",
      -      "totals",
      -      "granularity",
      -      "time_zone"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "data": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "count": {
      -              "maximum": 9007199254740991,
      -              "minimum": -9007199254740991,
      -              "type": "integer"
      -            },
      -            "id": {
      -              "type": "string"
      -            },
      -            "label": {
      -              "anyOf": [
      -                {
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ]
      -            },
      -            "value": {
      -              "type": "number"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "label",
      -            "count",
      -            "value"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "pagination": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "has_more": {
      -            "type": "boolean"
      -          },
      -          "limit": {
      -            "maximum": 9007199254740991,
      -            "minimum": -9007199254740991,
      -            "type": "integer"
      -          },
      -          "page": {
      -            "maximum": 9007199254740991,
      -            "minimum": -9007199254740991,
      -            "type": "integer"
      -          },
      -          "total_count": {
      -            "maximum": 9007199254740991,
      -            "minimum": -9007199254740991,
      -            "type": "integer"
      -          },
      -          "total_pages": {
      -            "maximum": 9007199254740991,
      -            "minimum": -9007199254740991,
      -            "type": "integer"
      -          }
      -        },
      -        "required": [
      -          "page",
      -          "limit",
      -          "total_count",
      -          "total_pages",
      -          "has_more"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "data",
      -      "pagination"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "data": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "count": {
      +              "maximum": 9007199254740991,
      +              "minimum": -9007199254740991,
      +              "type": "integer"
      +            },
      +            "period": {
      +              "description": "Bucket start as an ISO-8601 UTC instant.",
      +              "type": "string"
      +            },
      +            "value": {
      +              "description": "Sum of event value in the bucket (mixed currencies unless filtered).",
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "period",
      +            "count",
      +            "value"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "granularity": {
      +        "enum": [
      +          "hour",
      +          "day",
      +          "week",
      +          "month"
      +        ],
      +        "type": "string"
      +      },
      +      "time_zone": {
      +        "type": "string"
      +      },
      +      "totals": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "count": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "value": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "count",
      +          "value"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "data",
      +      "totals",
      +      "granularity",
      +      "time_zone"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "data": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "count": {
      +              "maximum": 9007199254740991,
      +              "minimum": -9007199254740991,
      +              "type": "integer"
      +            },
      +            "id": {
      +              "type": "string"
      +            },
      +            "label": {
      +              "anyOf": [
      +                {
      +                  "anyOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "additionalProperties": {},
      +                      "propertyNames": {
      +                        "type": "string"
      +                      },
      +                      "type": "object"
      +                    }
      +                  ]
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "Human label: the signature/campaign name, teammate email or country name (the id itself for the events summary's name/country/currency/user). For `anchor`, the link's content node as stored in the signature: an object with `type` (button, socialListItem, textToken…), `href.text` (the URL) or `href.smartFieldUuid` (a smart-field URL), and its visible `text`, `label` or `value` depending on the type. Null when none is available."
      +            },
      +            "value": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "id",
      +            "label",
      +            "count",
      +            "value"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "pagination": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "has_more": {
      +            "type": "boolean"
      +          },
      +          "limit": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "page": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "total_count": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "total_pages": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "page",
      +          "limit",
      +          "total_count",
      +          "total_pages",
      +          "has_more"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "data",
      +      "pagination"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so safety needs no restating. The description adds real behavioral context: the DEFAULT is a timeseries, the shape changes when group_by is set, and value is summed across currencies unless currency is supplied, which is a genuine correctness trap an agent would otherwise 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?

Front-loaded with the core definition, then response shapes, then the mode switch, then use cases — a sensible ordering with little waste. It is dense and sentence-long, but nearly every clause carries information an agent needs to pick the right mode.

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

Completeness5/5

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

With 16 parameters this could easily be under-specified, but the description covers the two operating modes, defaults, ranking, and the currency pitfall, and an output schema plus full schema descriptions cover return details and the required context parameter. Nothing an agent needs to invoke it correctly is missing.

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% with 16 well-described parameters including four enums, so the schema does the heavy lifting; baseline is 3. The description restates group_by/order_by/granularity behavior and the currency summing rule, but mostly mirrors what the schema already says rather than adding new syntax or edge-case detail.

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?

"Aggregated conversion/revenue numbers from recorded events" states a specific verb-equivalent and resource, and the mention of timeseries vs ranked breakdown makes the output contract clear. It does not explicitly name the sibling tools it is not (get_analytics_clicks, get_analytics_views, list_analytics_events), so an agent must infer the boundary from the word "events" alone.

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 closing sentence enumerates concrete use cases — total revenue, revenue by campaign/template/teammate/country, conversions per day, top customers — which gives a strong positive signal for when to call it. There is no explicit exclusion or named alternative for the cases where this is the wrong tool.

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.