resourceName is used as the label. Click on any custom event to see its full details, including parameters, response, and message.
If isError is set to true, the event is styled as an error in the timeline.
Publishing Events
After callingmcpcat.track(), use publishCustomEvent to send events tied to the current session. Pass the tracked server instance as the first argument.
Using a Session ID
If you have a session ID instead of the server instance, you can pass it directly as a string. MCPcat will derive a stable session from it.publishCustomEvent Reference
| Parameter | Type | Required | Description |
|---|---|---|---|
serverOrSessionId | Server | string | Yes | A tracked MCP server instance, or a session ID string |
projectId | string | Yes | Your MCPcat project ID (e.g. proj_abc123xyz) |
eventData | object | No | The event payload (see below) |
Event Data
| Field | Type | Description |
|---|---|---|
resourceName | string | A name for the event. Shows as the label in the dashboard timeline. If omitted, the event shows as “Custom”. |
parameters | object | Arbitrary data to attach to the event. Visible in the event detail panel. |
response | object | Response data to attach to the event. |
message | string | A human-readable description of what happened. |
duration | number | Duration of the event in milliseconds. |
isError | boolean | Set to true to mark this event as an error. |
error | object | Error details. Typically includes message and optionally type or code. |
tags | Record<string, string> | Indexed string key-value pairs for filtering and grouping. Subject to tag validation rules. |
properties | Record<string, any> | Arbitrary JSON metadata. No client-side validation constraints. |
eventData are optional. You can call publishCustomEvent with just the server and project ID to record a minimal custom event.
You can also enrich every auto-captured event with metadata — see Event Tags & Properties.