Skip to main content
Glama

Get email analytics

get_analytics
Read-onlyIdempotent

Email analytics for the workspace: sent, delivered, bounced, complained, opened, clicked, unsubscribed, conversions and revenue_cents as a zero filled time series (day buckets, hour buckets for ranges of two days or less), totals, rates (null when there is nothing to divide by) and a breakdown table. Counts are unique per recipient, bots ignored, counted when the event happened. Filter by range (7d, 30d, 90d, custom), type, source_id, step_id, provider and subscriber; group rows with by. availability says which sources exist: campaigns, sequences, conversions and segments are false until those features are set up, and their numbers are then zero. Errors: invalid_range, invalid_type, invalid_provider, invalid_subscriber, invalid_breakdown, segment_unavailable, insufficient_scope. Next: list_domains if sent is 0 and nothing has been sent yet.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_analytics"
  }
}

Input Schema

NameRequiredDescriptionDefault
byNoHow to group the table: "source" (default), "type" or "provider".
toNoLast day for range=custom, YYYY-MM-DD (UTC, inclusive). At most 366 days in total.
fromNoFirst day for range=custom, YYYY-MM-DD (UTC, inclusive).
typeNoSend type: "transactional", "campaign" or "sequence".
rangeNoDate range: "7d", "30d" (default), "90d" or "custom" (then from and to are required).
step_idNoA sequence step or campaign email id, together with source_id.
providerNoOutbound provider: "ses", "kumo" or "unknown".
source_idNoA campaign or sequence id, to look at one send.
subscriberNoOne subscriber's email address, or a segment id (seg_...).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover readOnly/idempotent/non-destructive/closed-world, and the description still adds substantial non-obvious behavior: zero-filled buckets, hourly buckets for ranges of two days or less, rates returned as null when the denominator is zero, unique-per-recipient counts with bots ignored, event-time attribution, and the 366-day cap. It also enumerates the failure modes (invalid_range, invalid_type, invalid_provider, invalid_subscriber, invalid_breakdown, segment_unavailable, insufficient_scope) and explains how availability flags gate campaign/sequence/conversion/segment data.

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 purpose, then semantics, then filters, then errors, then next step — a sensible ordering with no filler sentences. It is dense and long for a single paragraph; splitting the error list and availability note into their own structure would improve scannability, but every sentence carries information.

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?

There is no output schema, so the description must explain returns — and it does, specifying time series with bucket granularity, totals, rates with null semantics, and a breakdown table. Combined with the error enumeration, availability caveats, and next-step guidance, an agent has everything needed to call this correctly and interpret ambiguity in the response.

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?

Schema coverage is 100%, so the schema carries the parameter documentation and baseline would be 3. The description still adds meaning not derivable from the schema: bucket granularity depends on the selected range (hours for ranges of two days or less), counts are unique per recipient and attributed to event time, and `by`/filter parameters drive a breakdown table whose rows can be empty when `availability` flags are false.

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+resource plus the exact metric set (sent, delivered, bounced, complained, opened, clicked, unsubscribed, conversions, revenue_cents) and the response shape (time series, totals, rates, breakdown table). This is clearly a read-only analytics aggregation, distinguishable from siblings like get_email_tracking or get_tracking_settings without opening a schema.

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?

Gives concrete usage context through the filter dimensions (range, type, source_id, step_id, provider, subscriber, by) and an explicit next-step routing: 'Next: list_domains if sent is 0 and nothing has been sent yet.' It stops short of naming a competing analytics/tracking sibling and stating when to prefer it, so it is clear context without explicit exclusions.

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.

Resources