Skip to main content
Glama

metric_aggregate

Read-only

Aggregate any Klaviyo metric, including opens, clicks, and revenue, over custom dates or preset timeframes with hourly to monthly intervals. Get flexible metric-level totals for deeper analysis.

Instructions

Aggregate values for any Klaviyo metric (e.g. opens, clicks, revenue) over a custom timeframe + interval. More flexible than campaign/flow reports - use for any metric.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoCustom end YYYY-MM-DD. Defaults to now.
startNoCustom start YYYY-MM-DD. Raw events have NO 2023 floor - reaches back to account inception. Max 1 year per call.
accountYesAccount name
intervalNoNote: metric-aggregates uses singular (hour/day/week/month), NOT the series-report plural form.
metric_idYesMetric ID. Get from list_metrics.
timeframeNoPreset lookback. Use this OR start/end. Default: last_30_days.
measurementNocount, sum_value (revenue), or unique. Default count.

Schema Changelog

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

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already state readOnlyHint=true and openWorldHint=true, so a safe read operation is established. The description adds the scope of any metric and flexible time aggregation, but it does not disclose response shape, maximum lookback, or rate-limit behavior. This is acceptable given annotation coverage, but not rich.

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?

Two short sentences with no filler: the first states what the tool does, and the second states when to prefer it. The slight repetition of 'any metric' is minor, and the differentiator sentence earns its place.

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?

The schema documents all parameter semantics, required fields, and enum choices, and the description gives purpose and routing. The only gap is no output-shape hint, but no output schema is provided and the read-only annotation reduces risk.

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?

The input schema covers 100% of parameters with meaningful descriptions, including enum values, defaults, and the singular interval note. The description only paraphrases 'custom timeframe + interval' and adds no parameter details beyond the schema.

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 names a concrete operation ('Aggregate values'), a target resource ('any Klaviyo metric'), and a defining capability (custom timeframe + interval). It also differentiates the tool from campaign/flow reports, so an agent can distinguish it from sibling report 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?

It explicitly says 'More flexible than campaign/flow reports - use for any metric', which gives a clear preference signal for generic metric aggregation. It does not enumerate when-not-to-use conditions or name the exact sibling alternatives, but the context is sufficient for routing.

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/scalably-io/klaviyo-mcp'

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