Skip to main content
Glama
arttus

umami-mcp-server

by arttus

Create a cohort visible in the Umami UI

umami_create_cohort

Create a saved audience cohort in Umami to group visitors who performed a specific action within a date range, with optional filters. Use it to build reusable segments for Audience analysis.

Instructions

Create a persisted audience Cohort (visitors who performed an action within a date range, optionally filtered further) that appears under Audience > Cohorts in the Umami UI.

Args:

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

  • name (string, required): Display name for the cohort.

  • action_type ('path' | 'event', required): Whether the qualifying action is a page view or a custom event.

  • action_value (string, required): The page path (e.g. '/audit') or event name (e.g. 'signup').

  • date_range ('7day'|'30day'|'90day'|'6month'|'12month'): Window the action must fall in, default '30day'.

  • filters (array, optional): Additional filters, each { dimension, value, is_not? }.

  • match ('all' | 'any'): Whether every filter must match, or just one (default: 'all').

Returns: { "id": string, "name": string, "type": "cohort", "parameters": object }

Examples:

  • "Visitors who viewed /audit in the last 30 days" -> action_type='path', action_value='/audit'

  • "Mobile visitors who fired 'signup' in the last 90 days" -> action_type='event', action_value='signup', date_range='90day', filters=[{dimension:'device', value:'mobile'}]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDisplay name for the cohort.
matchNoWhether every filter must match ('all') or just one ('any').all
filtersNoAdditional filters, if any.
websiteNoWebsite ID (UUID), name, or domain. Optional if UMAMI_DEFAULT_WEBSITE is set. Use umami_list_websites to discover values.
date_rangeNoWindow in which the action must have occurred.30day
action_typeYesWhether the action is a page view or a custom event.
action_valueYesPage path (e.g. '/audit') or event name (e.g. 'signup').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already indicate mutation (readOnlyHint=false, idempotentHint=false), and the description adds that the cohort is 'persisted' and 'appears under Audience > Cohorts in the Umami UI', plus the return shape. It does not contradict annotations. It could disclose more about duplicates or permissions, but the added persistence/UI context justifies a 4.

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 organized into Args, Returns, and Examples sections, with the core purpose front-loaded. Some parameter details are redundant with the schema, but the examples and return type add useful context and the structure is easy to scan.

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 7-parameter create tool with no output schema, the description covers the return object, defaults, parameter semantics, optional website behavior, and examples. An agent has everything it needs to select and invoke the tool correctly.

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 seven parameters. The description's Args section largely restates this information, though the two natural-language examples help map intent to parameter values. It adds modest value beyond the schema, so baseline 3 applies.

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?

States a specific verb ('Create') and resource ('persisted audience Cohort'), locates the result in the Umami UI ('Audience > Cohorts'), and clearly distinguishes this from sibling tools like umami_create_segment or umami_create_funnel by defining exactly what a cohort is.

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?

The description gives clear context about what a cohort is and provides natural-language examples, but it never explicitly says when to choose this tool over related creation tools or when not to use it. Usage is implied by the cohort definition rather than stated as direct guidance.

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