Skip to main content
Glama
arttus

umami-mcp-server

by arttus

List visitor sessions

umami_list_sessions
Read-onlyIdempotent

List individual visitor sessions for any website over a date range to uncover real visit behavior, page depth, and engagement sources beyond aggregate stats.

Instructions

List individual visitor sessions for a website over a date range, newest first.

Sessions are anonymous. Use this to inspect real visit behaviour rather than aggregates: how many pages a typical visit covers, where high-engagement visitors come from, or what a spike actually consisted of.

Args:

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

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

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

  • search (string, optional): Free-text search across session attributes.

  • page (number): Page number, 1-based (default: 1).

  • page_size (number): Sessions per page, 1-100 (default: 20).

  • filters (object, optional): Segment filters such as { country: 'US' }.

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

Returns: JSON shape: { "total": number, "page": number, "page_size": number, "sessions": [ { "id": string, "country": string, "city": string, "device": string, "browser": string, "os": string, "first_at": string, "last_at": string, "visits": number, "views": number } ], "has_more": boolean }

Examples:

  • "Show me sessions from yesterday" -> range="yesterday"

  • "Which visits looked at the most pages this week?" -> range="this_week", page_size=50

Error handling:

  • Returns an empty result set when no sessions occurred in the range.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number, 1-based.
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.
searchNoFree-text search across session attributes.
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'.
page_sizeNoSessions per page.
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.4/5.0
Behavior5/5

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

The annotations already establish read-only, idempotent, non-destructive behavior, and the description adds meaningful context beyond that: sessions are anonymous, results are newest-first, an empty result set is returned when no sessions exist, and the exact JSON response shape is documented. This is especially valuable because there is no output schema.

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 description is well-organized into purpose, args, returns, examples, and error handling, with the core purpose front-loaded. It is longer than minimal because it documents the return shape and examples, which are justified by the lack of an output schema, though the Args list partially duplicates schema content.

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 9-parameter tool with no output schema, the description is complete: it states the operation, scope, ordering, parameter behavior, return shape, example usage, and error handling. Nothing an agent needs to invoke it correctly appears to be missing.

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%, so the schema already documents all parameters thoroughly. The description adds short examples and clarifies that start_date/end_date override range, but it mostly repeats information already present in the input schema, which is adequate but not additive.

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: 'List individual visitor sessions for a website over a date range, newest first.' It clearly differentiates the tool from aggregate analytics tools by emphasizing that it exposes individual sessions rather than aggregates, which is enough to distinguish it from siblings like umami_get_stats and umami_traffic_report.

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 explicitly states when to use this tool: 'Use this to inspect real visit behaviour rather than aggregates,' and gives concrete example phrasings. It does not name specific alternative tools for non-list session needs, but the exclusion of aggregates and the examples provide clear practical guidance.

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