Skip to main content
Glama
arttus

umami-mcp-server

by arttus

Get common page-visit sequences

umami_get_journeys
Read-onlyIdempotent

Analyze visitor session trails to uncover the most common page-path sequences from entry onward, revealing how users navigate your site.

Instructions

Get the most common sequences of pages visitors take through the site.

Umami has no journey/path-analysis endpoint, so this walks every session's activity trail in the range (capped by max_sessions), reduces each to its ordered page paths (consecutive repeats collapsed), truncates to 'depth' steps, and ranks the most frequent sequences.

Args:

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

  • start_path (string, optional): Only include sessions whose first page matches this path, e.g. '/'.

  • depth (number): Steps per sequence shown, default 4, max 8.

  • limit (number): Top N sequences to return, default 10, max 50.

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

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

  • filters (object, optional): Segment filters applied to the session pool.

  • max_sessions (number): Cap on sessions scanned, default 500, max 2000.

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

Returns: JSON shape: { "sequences": [ { "path": string, "sessions": number, "pct": number } ], "matched_sessions": number, "scanned_sessions": number, "total_sessions_in_range": number, "truncated": boolean }

Examples:

  • "What do people do after landing on the homepage?" -> start_path="/", depth=3

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNoSteps per sequence shown.
limitNoTop N sequences to return.
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'.
start_pathNoOnly include sessions whose first page matches this path.
max_sessionsNoMaximum sessions to scan. Higher is more accurate but slower (one extra API call per session).
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?

Annotations already mark this as read-only, idempotent, and non-destructive, and the description adds substantial behavioral detail beyond that: it walks every session's activity trail, collapses consecutive repeats, truncates to depth steps, caps scanning via max_sessions, and returns a truncated flag. It also explains the performance tradeoff through the max_sessions cap. No contradiction with annotations.

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 well-organized and front-loaded: a one-sentence purpose, a concise algorithm paragraph, a compact args list, return shape, and an example. Despite the detail, every section earns its place and the structure makes scanning easy for an agent.

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?

For a 10-parameter tool with no output schema, the description is unusually complete. It explains the computation, the cap behavior, all parameter semantics, the exact JSON return shape, and a usage example. Nothing essential for correctly invoking the tool is missing.

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 100%, so the baseline is 3, but the description adds practical meaning with the algorithm explanation and the example mapping 'What do people do after landing on the homepage?' to start_path='/' and depth=3. The Args list compacts defaults and constraints, though some entries repeat schema descriptions.

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 most common sequences of pages visitors take through the site.' It makes clear this is a journey/path-analysis tool, distinct from pageview series, metrics, funnels, and retention tools, and it further clarifies that no native Umami endpoint exists for journeys.

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 strong contextual usage guidance, including the concrete example 'What do people do after landing on the homepage?' and how to express it with start_path and depth. It does not explicitly contrast against sibling tools like umami_get_funnel or umami_get_retention, so exclusions and when-not-to-use guidance are absent.

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