Skip to main content
Glama

Get Link Analytics Breakdown

get_aggregate_stats
Read-onlyIdempotent

Get aggregated analytics for a link: clicks by day (7/30/90d), top countries, device breakdown, top referrers, inbound source breakdown (ref/partner params), and UTM breakdown (source/medium/campaign). Available on Builder plans and higher, with up to 365 days of history. Note: analytics events captured during an overage period are excluded until the billing cycle resets or the monthly click limit increases.

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": {
      "short_code": "<short_code>"
    },
    "name": "get_aggregate_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodNoAnalytics window (default "30d"). Tier limits apply.
short_codeYesThe short code to analyze

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

The annotations already declare this as read-only, idempotent, non-destructive, and not open-world. The description adds important behavior beyond those annotations: Builder-plan gating, up to 365 days of history, and exclusion of analytics events captured during overage periods.

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?

The description is front-loaded with the core metrics, then adds plan/history and overage caveats. It is dense but structured, with no redundant filler.

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 no output schema, the description still enumerates the returned analytics categories and explains key constraints like plan eligibility and overage-event exclusion. That is sufficient for an agent to invoke the tool correctly.

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 100% and the period parameter is an enum, so the schema already documents the parameters well. The description reinforces the available time windows and tier limits but does not add significant meaning beyond what the schema provides.

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?

The description uses a specific verb and resource and enumerates the analytics dimensions returned, such as clicks by day, countries, devices, referrers, inbound sources, and UTM breakdowns. It does not explicitly distinguish itself from sibling tools like get_link_stats or get_recent_clicks, so it is clear but lacks sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states plan availability, maximum history, and period options, which gives useful context. However, it does not explicitly say when to use this tool versus alternatives such as get_link_stats, get_recent_clicks, or export_link_stats.

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