Skip to main content
Glama
arttus

umami-mcp-server

by arttus

Get conversion rate toward a goal

umami_get_goal
Read-onlyIdempotent

Calculate conversion rates for single-step goals by comparing visitors who reached a target page or triggered a custom event against all visitors within a selected date range.

Instructions

Get the conversion rate for a single-step goal: visitors who reached a page, versus all visitors in the same range.

A goal is either a page ('path') or a custom event ('event'). Pass exactly one. Umami has no dedicated goals feature, so this is computed by comparing two filtered calls to the stats endpoint.

Args:

  • website (string, optional): Website ID, name, or domain.

  • path (string): Goal is reaching this page, e.g. '/thank-you'. Exactly one of path/event required.

  • event (string): Goal is firing this custom event, e.g. 'signup'. Exactly one of path/event required.

  • range (string): Date range, default '7d'.

  • start_date / end_date (string, optional): Explicit bounds, overriding 'range'.

  • filters (object, optional): Segment filters applied to both the goal and the baseline, e.g. { country: 'US' }.

  • response_format ('markdown' | 'json'): Output format (default: 'markdown').

Returns: JSON shape: { "goal": { "type": "path"|"event", "value": string }, "baseline_visitors": number, "goal_visitors": number, "conversion_rate_pct": number }

Examples:

  • "What % of visitors reach the thank-you page?" -> path="/thank-you"

  • "Conversion rate on the signup event this month" -> event="signup", range="this_month"

Error handling:

  • A goal event with zero occurrences usually means the tracker never fired umami.track(event_name) in the range, not an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoGoal page path, e.g. '/thank-you'.
eventNoGoal custom event name, e.g. 'signup'.
rangeNoDate range for the query, default '7d'. Relative ("30m", "24h", "7d", "4w", "3mo", "1y"), named ("today", "yesterday", "this_week", "last_week", "this_month", "last_month", "this_year", "last_year", "mtd", "ytd", "all_time"), or an explicit ISO date via start_date/end_date.
filtersNoOptional segment filters. Supported keys: path, referrer, title, query, browser, os, device, country, region, city, language, hostname, tag, event, distinctId, utmSource, utmMedium, utmCampaign, utmContent, utmTerm, segment, cohort. Example: { country: 'US', device: 'mobile' }.
websiteNoWebsite ID (UUID), name, or domain. Optional if UMAMI_DEFAULT_WEBSITE is set. Use umami_list_websites to discover values.
end_dateNoExplicit end date (YYYY-MM-DD, ISO 8601 timestamp, or epoch ms). Overrides 'range'.
start_dateNoExplicit start date (YYYY-MM-DD, ISO 8601 timestamp, or epoch ms). Overrides 'range'.
response_formatNoOutput format: 'markdown' for a readable summary, 'json' for raw structured data.markdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnly and idempotent annotations, the description discloses that Umami has no dedicated goals feature, that the metric is computed by comparing two filtered calls to the stats endpoint, and that a zero-occurrence event usually means the tracker never fired rather than an error. This is valuable behavioral context that annotations do not provide.

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 long but well-structured with Args, Returns, Examples, and Error handling sections. Each part earns its place: parameter relationships are clarified, return shape is given, and realistic usage examples are included. The slight repetition of 'exactly one of path/event required' is acceptable for emphasis.

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 appropriately provides the JSON return shape. It also covers error interpretation, parameter dependencies, defaults, and example mappings from user intent to arguments. An agent has enough information to select and invoke the tool correctly without additional inference.

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 already 100%, but the description adds important semantic detail: exactly one of path/event is required, start_date/end_date override range, filters apply to both the goal and the baseline, and response_format controls output style. This goes beyond the schema's per-field descriptions and helps an agent construct correct calls.

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 specific verb and resource: 'Get the conversion rate for a single-step goal: visitors who reached a page, versus all visitors in the same range.' It clearly defines the goal types (path or event) and distinguishes this from raw stats or multi-step funnels, making the tool's purpose unambiguous.

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?

The description gives clear context for when to use the tool: for single-step goal conversion rates, with exactly one of path/event required. It does not explicitly name alternatives such as umami_get_funnel for multi-step goals or umami_get_stats for raw analytics, so it falls short of full when-not guidance, but the usage context is strong.

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