Skip to main content
AgentCat captures each tool call of your MCP server. Sometimes you want more information on each event, to query or debug it later. Event tags and properties let you attach that context:
  • Tags: string key-value pairs for filtering and grouping in the dashboard and in exported data
  • Properties: flexible JSON for any other context, like feature flags, device info, or build metadata
Both are hooks in the options of track(). AgentCat calls them for each tool call and attaches their result to the event, so you set them up once and never change your tool handlers. Both hooks receive the same arguments as the identify hook of your SDK. If a hook fails or returns nothing, the event still goes out, without that metadata.

Event tags

Use eventTags for values that you want to filter or group by in the dashboard, such as environments, regions, trace IDs, or deployment versions.

Event properties

Use eventProperties for flexible JSON metadata. AgentCat does not validate properties, beyond the need for valid JSON.

Using both together

We recommend tags for the values that you filter by in a dashboard, and properties for the detail that you want when you open a specific event. Some ways to use them:
  • Tagging by environment. Tags for the deployment environment and region let you compare error rates and tool usage across production, staging, and development.
  • Attaching feature flags. Properties with the active feature flags and build metadata show which configuration was active when a tool call happened, which helps when a tool behaves differently for some users.
  • Correlating with external observability. Tags with the trace and span IDs of your observability stack link AgentCat events to traces in Datadog, Sentry, or any OpenTelemetry platform.

Tags and properties in your language

Each SDK has the same two hooks, named for the style of its language. The reference page of each language describes their arguments and return types:

Tag validation rules

The SDKs check tags before they attach them to events. They drop each invalid entry and write a warning to their log (see Debug Mode).
  • Keys: 32 characters or fewer, from [a-zA-Z0-9$_.:\- ] (letters, digits, dollar signs, dots, underscores, colons, hyphens, and spaces)
  • Values: strings of 200 characters or fewer, with no newline characters
  • Entries: at most 50 tags for each event. AgentCat drops the entries after the limit.
Event properties have no client-side validation: AgentCat accepts any valid JSON. Only tags are validated.
Tag validation applies to the results of the tags hook and to the inline tags of custom events. AgentCat drops invalid entries, but the event still goes out.