Skip to main content
Glama

Segment an event

mixpanel_segmentation
Read-only

Count/segment/filter a single event over a date range. e.g. 'Signed up' by country last week. Params on/where use Mixpanel segmentation expressions like properties["$country_code"]. Query API: GET /segmentation. (Upstream maintenance mode — for saved reports prefer mixpanel_query_insights.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
onNoProperty expression to segment on, e.g. properties["$city"].
typeNogeneral | unique | average. Default general.
unitNoBucket size. Default day.
eventYesSingle event name to analyze (not an array).
limitNoTop N property values (only if `on` set). Default 60.
whereNoFilter expression, e.g. properties["$os"]=="iOS".
to_dateYesEnd date yyyy-mm-dd (inclusive).
from_dateYesStart date yyyy-mm-dd (inclusive).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the description adds value by mentioning the underlying API endpoint ('Query API: GET /segmentation'). No contradictory statements, but no additional behavioral traits like rate limits or destructive actions are disclosed.

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?

Three sentences efficiently convey purpose, example, and usage notes. No redundant words; the most critical information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 8 parameters (3 required), 100% schema explanation, and no output schema, the description covers the core function and provides context for expression syntax and tool preference. Could briefly mention output format, but not required.

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 coverage is 100% with each parameter described in the schema. The description adds minimal extra semantic value beyond noting the expression format for `on` and `where`. Baseline 3 is appropriate.

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 explicitly states the action ('Count/segment/filter') and resource ('a single event over a date range'), includes a concrete example, and distinguishes from the sibling tool mixpanel_query_insights by noting maintenance mode preference.

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?

Provides clear guidance on when to use this tool (for segmentation queries) and when to prefer an alternative (saved reports using mixpanel_query_insights). Also explains the expression syntax for parameters `on` and `where`.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.