Skip to main content
Glama
deadrime

posthog-toolkit-mcp

by deadrime

Find session replays

posthog_replays
Read-only

Retrieve session recordings for a user or device by distinct_id within a time window, ordered newest first, with direct links to watch each replay.

Instructions

Session recordings of one distinct_id in a time window, newest first, with links to watch them. Recordings older than the instance retention are gone. Naive timestamps are read in the project timezone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoWindow end, ISO 8601; defaults to now
fromNoWindow start, ISO 8601; defaults to 7 days before `to`
limitNoMaximum number of sessions
project_idNoProject id; defaults to POSTHOG_PROJECT_ID
distinct_idYesdistinct_id of the person or device

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already convey read-only behavior, and the description adds meaningful context: results are sorted newest first, recordings older than instance retention are unavailable, and naive timestamps are interpreted in the project timezone. It does not describe auth requirements, rate limits, or the exact response shape, but those gaps are minor for a read-only lookup tool.

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 short sentences, with the core function front-loaded. Every sentence earns its place: ordering, watch links, retention limitation, and timezone behavior. There is no filler or repetition of schema details.

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?

All facts needed to select and invoke the tool are covered: required distinct_id, optional window bounds, limit, ordering, retention, and timezone interpretation. With no output schema, the description only minimally describes the return value via 'links to watch them,' but that is sufficient for basic invocation confidence.

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?

The schema has 100% description coverage, so the baseline is 3. The description adds genuine cross-parameter nuance beyond individual field docs: the from/to window parameters assume naive timestamps in the project timezone, and results are ordered newest first. This helps the agent format the time-window 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 resource: session recordings for one distinct_id in a time window, with a clear ordering (newest first) and an output affordance (links to watch them). This is distinct from the sibling tools like posthog_query or posthog_api_get, which are more generic. An agent can tell exactly what this tool does without opening the schema.

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 intended use is clear from context: fetch session replays for exactly one distinct_id within a bounded time window. However, there is no explicit guidance about when to prefer this over sibling tools or when it would not be appropriate. The agent must infer that posthog_query is not the right tool for retrieving watchable replay links.

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