Skip to main content
Glama
umami-mcp

umami-mcp

by chukycheese

get_metrics

Rank and return top values for a selected Umami analytics dimension, such as page URL, referrer, country, or event, by count for a website over a date range.

Instructions

Return the top values of one dimension, ranked by count.

Args: website_id: Website id from list_websites. metric_type: Dimension to rank: url (default; "path" on newer Umami), entry, exit, title, referrer, domain, channel, event, tag, browser, os, device, screen, language, country, region, city, utmSource, utmMedium, utmCampaign. start_at: Range start (ISO date/datetime or epoch milliseconds). end_at: Range end; defaults to now. days: Length of the default range when start_at is omitted. limit: Maximum number of rows.

Returns rows of {"x": value, "y": count} ordered by count, descending.

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": {
      "website_id": "<website_id>"
    },
    "name": "get_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNo
limitNo
end_atNo
start_atNo
website_idYes
metric_typeNourl

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden. It does disclose ordering (count descending) and row shape, and it flags the version-dependent url/path behavior, which is genuinely useful. It says nothing about permissions, cost, rate limits, or whether the operation is read-only, so an agent must assume safety.

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 one-line summary is front-loaded and the Args block is scannable. The metric_type enumeration is long but each value earns its place since the schema has no enum; minor waste in restating defaults already present in the schema (days=7, limit=20) is not shown here, so the prose stays tight.

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?

For a six-parameter analytics query with an output schema already covering the return type, the definition fills the important gaps: parameter meaning, defaults, ordering, and the upstream dependency on list_websites. The only missing piece is routing guidance relative to the stats/pageviews/events siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and there are no enums, yet the description documents all six parameters: the source of website_id, the full 17-value enumeration for metric_type (including the version-dependent 'url' vs 'path' default), accepted date formats for start_at, the 'defaults to now' behavior of end_at, and the meaning of days and limit. This is exactly the compensation the low schema coverage requires.

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 opening sentence gives a specific verb and resource: return top values of one dimension ranked by count. That is a distinct shape from the sibling tools named (get_pageviews, get_stats, get_events), though the description never explicitly contrasts itself with them, leaving the agent to infer the difference from the names.

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?

Usage is only implied: the Args block tells the agent that start_at can be omitted in favor of days, and that website_id comes from list_websites, which is a useful precondition. There is no statement of when to prefer this over get_stats or get_pageviews, and no exclusions or caveats about which metric_type values are valid on which Umami version beyond the parenthetical about 'path'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.