Skip to main content
Glama

Analytics

flow_get_analytics
Read-only

Sending analytics for a period of up to a year: quality (sent, delivered, seen, spend, daily series), channel_mix (per channel, with spend), templates (the top 5 templates by volume, with spend), opt_out, clicks (null when link tracking is off) or campaigns (per campaign, paged). Optionally narrowed to a sender, campaign or template. The campaigns report counts messages; the other reports count SMS as billed, each part once, so their totals run higher for long SMS. Every report counts each fallback hop. spend is in EUR. opt_out counts opt-outs through a campaign's opt-out link only, not every number added to the blocklist (nor one opted out through the link of a test send or an API message, which carries no campaign), and its delivered covers marketing campaigns, so it differs from quality. campaigns lists the campaigns scheduled, still sending, cancelled or with traffic in the period; seen is null where nothing was delivered on a channel with read receipts, and recipients is null when the row covers only part of the campaign (a sender or template filter, or a campaign that began before the period). quality's series has one row per UTC day of the period, zeros on a day with no traffic. In templates, clicked is null for a template with no tracked links and 0 when its links were not clicked. opt_out's and clicks' rate is a percentage (0.7 means 0.7%).

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": {
      "report": "<report>",
      "from": "<from>",
      "to": "<to>"
    },
    "name": "flow_get_analytics"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesISO date (to the end of that day in UTC) or date-time
fromYesISO date (2026-11-01, from the start of that day in UTC) or date-time (2026-11-01T00:00:00+01:00)
pageNocampaigns report only
reportYes
pageSizeNocampaigns report only
senderIdNo
campaignIdNo
templateIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds substantial behavioral context beyond that: spend is in EUR, totals count each fallback hop per part, opt_out covers only campaign-link opt-outs and can therefore differ from quality, seen/recipients/clicked can be null with specific meanings, and rates are percentages. With annotations carrying the safety profile, this is a solid contribution rather than a contradiction.

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 report inventory is front-loaded, which is the right priority, and nearly every clause conveys a real semantic caveat. The opening sentence is an overlong run-on packing six report types plus their fields, and the caveat-heavy tail could be broken into a short list for faster scanning, but little is redundant.

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?

There is no output schema, so the description must carry the burden of explaining return values, and it does so extensively with per-report field semantics, null conditions, currency and counting rules. Gaps remain around filter applicability per report and any error or empty-period behavior, but an agent has enough to call it correctly and interpret results.

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 50%, and the description compensates partially by stating the maximum period is one year and that results can be optionally narrowed to a sender, campaign or template, mapping loosely to senderId/campaignId/templateId. It does not clarify which filters are valid for which reports, nor the interaction between report and page/pageSize beyond repeating the schema's 'campaigns report only'. Baseline 3 is appropriate given the remaining coverage gap.

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 concrete verb and resource ('Sending analytics for a period of up to a year') and then enumerates all six report types with what each contains (quality, channel_mix, templates, opt_out, clicks, campaigns). An agent can tell this is a read-only reporting tool and distinguish it from sibling getters like flow_get_campaign or flow_list_campaigns without opening the 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?

It gives strong guidance on selecting the right report value by contrasting what each counts ('The campaigns report counts messages; the other reports count SMS as billed'), which is exactly the decision an agent must make. It also notes optional narrowing by sender, campaign or template. However, it never states when to prefer this tool over a sibling (e.g. flow_list_campaigns for enumerating campaigns) and gives no 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