- Tags: string key-value pairs designed for filtering and grouping in the dashboard and exported data
- Properties: flexible JSON for arbitrary context like feature flags, device info, or build metadata
mcpcat.track() that attach metadata to every auto-captured event - tool calls, tool lists, and session initialization. You set them up once and every event gets enriched automatically, without modifying individual tool handlers.
Both callbacks receive the same (request, extra) arguments as identify, and if they throw or return null, the event is still sent without metadata.
Event Tags
UseeventTags to attach structured, filterable metadata to every event. Tags are ideal for values you’ll want to filter or group by in the dashboard, such as environments, regions, trace IDs, or deployment versions.
Event Properties
UseeventProperties to attach flexible JSON metadata. Properties have no client-side validation constraints beyond being valid JSON.
Using Both Together
Use tags for the values you’d filter by in a dashboard and properties for the detail you’d want when clicking into a specific event.Examples
Tagging by Environment
Tag events with your deployment environment and region to compare error rates and tool usage patterns across production, staging, and development.Attaching Feature Flags
Attach feature flags and build metadata as properties so you can see exactly what configuration was active when a tool call happened — useful for debugging why a tool behaves differently for certain users.Correlating with External Observability
Tag events with trace and span IDs from your existing observability stack to link MCPcat events directly to traces in Datadog, Sentry, or any OpenTelemetry-compatible platform.Tag Validation Rules
Tags are validated client-side before being attached to events. Invalid entries are silently dropped with a warning written to~/mcpcat.log.
- Keys: Must be 32 characters or fewer and match
[a-zA-Z0-9_.:\- ](letters, digits, dots, underscores, colons, hyphens, spaces) - Values: Must be strings, 200 characters or fewer, and cannot contain newline characters
- Max entries: 50 tags per event — entries beyond the limit are dropped
Event properties have no client-side validation constraints — any valid JSON
is accepted. Only tags are validated.
Tag validation applies to both
eventTags callback results and inline tags
on custom events. Invalid entries are dropped, but the
event is still sent.