Skip to main content
Glama
arttus

umami-mcp-server

by arttus

Get session detail and activity

umami_get_session
Read-onlyIdempotent

Retrieve session details and chronological page/event trail to trace an individual visitor's journey from entry to exit.

Instructions

Get details for one visitor session, optionally including the full page-by-page activity trail.

Use this to trace an individual journey through the site: entry page, path taken, events fired, exit point. Get session IDs from umami_list_sessions with response_format='json'.

Args:

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

  • session_id (string, required): Session UUID.

  • include_activity (boolean): Include the chronological page and event trail (default: true).

  • range (string): Date range to search for activity, default '30d'. Activity outside this range is not returned.

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

Returns: JSON shape: { "session": { "id": string, "country": string, "device": string, "browser": string, "os": string, "first_at": string, "last_at": string, "visits": number, "views": number, "events": number, "totaltime": number }, "activity": [ { "created_at": string, "url_path": string, "referrer_domain": string, "event_name": string } ] }

Examples:

  • "What did session abc123 do on the site?" -> session_id="abc123...", include_activity=true

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rangeNoDate range to search for activity, default '30d'.
websiteNoWebsite ID (UUID), name, or domain. Optional if UMAMI_DEFAULT_WEBSITE is set. Use umami_list_websites to discover values.
session_idYesSession UUID, from umami_list_sessions.
response_formatNoOutput format: 'markdown' for a readable summary, 'json' for raw structured data.markdown
include_activityNoInclude the chronological page and event trail.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover readOnly, idempotent, and non-destructive behavior. The description adds meaningful behavioral detail beyond those hints: the optional activity trail, the boundary that activity outside the selected range is not returned, and a concrete JSON shape showing what fields to expect. This gives the agent an accurate mental model of the tool's behavior.

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 purpose, followed by a short use-case statement, compact argument bullets, a return shape, and one illustrative example. Every section contributes useful information and there is no filler or redundant repetition.

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?

There is no output schema, so the description correctly supplies a detailed JSON return shape for both session and activity entries. It also covers defaults, source of the required session_id, and the range-sensitive behavior. This is sufficient for an agent to call the tool correctly and interpret the result.

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 description coverage is 100%, so the baseline is 3. The description adds practical semantics beyond the schema: it explains where session_id comes from, gives an example mapping a natural-language request to session_id and include_activity, and clarifies that range determines whether activity is returned. These additions help the agent choose and populate parameters correctly.

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 states a specific verb+resource: 'Get details for one visitor session', and immediately clarifies the individual-level scope with an optional page-by-page activity trail. It differentiates this tool from list/aggregate siblings by saying it traces an individual journey and by pointing to umami_list_sessions as the source for session IDs.

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 on when to use it: 'Use this to trace an individual journey through the site: entry page, path taken, events fired, exit point.' It also tells the agent where to get the required session_id. It does not explicitly state when not to use it or compare it to nearby alternatives like umami_get_journeys, so it stops short of a 5.

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