Events emitted when tools are executed against the Model Context Protocol (MCP) Server in a Qlik Cloud tenant.

  • com.qlik.ai.mcp.tool.executed is published when an individual tool is executed, and includes the tool name, the client ID of the OAuth application that requested the execution, the execution latency in milliseconds, and any error message if the execution failed.
  • com.qlik.ai.mcp.tool.calls.aggregated is published when a set of tool calls are made, and summarizes a batch of tool calls with the count of calls, the total execution latency across all calls, and references to the individual tool execution events for traceability.

Use these events to analyze tool usage patterns, detect performance trends, and monitor tool performance.

Availability

These events are currently available for consumption via Audits (Events) only.

Tool calls aggregated

Published when aggregated tool call metrics are generated after a configured threshold (default 5 tool calls) or timeout. Includes the count of tool calls, total execution latency across all calls in milliseconds, and event IDs of the individual tool execution events. Use this to analyze tool usage patterns and detect performance trends.

Payload

object
  • id string
    Required

    Identifies the event.

  • time string

    Timestamp of when the occurrence happened. Must adhere to RFC 3339.

  • type string
    Required

    Describes the type of event related to the originating occurrence.

  • source string
    Required

    Identifies the context in which an event happened.

  • specversion string
    Required

    The version of the CloudEvents specification which the event uses.

    Can be one of: "1.0"

  • datacontenttype string

    Content type of the data value. Must adhere to RFC 2046 format.

  • userid string
    Required

    The unique identifier for the user related to the event.

  • tenantid string
    Required

    The unique identifier for the tenant related to the event.

  • data object

    The aggregated metrics for a batch of tool calls, including the count of tool calls, cumulative latency across all calls, and references to individual tool execution events for traceability.

    Show data properties
    • eventIds array of strings
      Required

      The list of CloudEvent IDs from individual tool execution events that were aggregated. Provides traceability to the original toolExecuted events for detailed analysis.

    • toolCount integer
      Required

      The number of tool calls aggregated in this event.

    • totalLatencyMs integer
      Required

      The total execution latency across all aggregated tool calls, in milliseconds.

com.qlik.ai.mcp.tool.calls.aggregated

Example payload of the "Tool calls aggregated" event

{
"id": "id123",
"time": "2018-10-30T07:06:22Z",
"type": "com.qlik.ai.mcp.tool.calls.aggregated",
"source": "com.qlik/mcp",
"specversion": "1.0",
"datacontenttype": "application/json",
"userid": "ad378d54-3e97-47c0-bc57-cd84dbb93fa2",
"tenantid": "103359ca-3579-4125-a0dc-d19531b53186",
"data": {
"eventIds": [
"550e8400-e29b-41d4-a716-446655440000",
"6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"7c9e6679-7425-40de-944b-e07fc1f90ae7",
"88f7f2e9-9c8a-4f9b-a8b5-9d8c7e6f5a4b",
"99a8b3d4-1e2f-3c4d-8e6f-7a8b9c0d1e2f"
],
"toolCount": 5,
"totalLatencyMs": 1245
}
}

Tool executed

Published when a tool is executed in MCP. Includes the tool name, client ID, execution latency in milliseconds, and any error message if execution failed. Optionally includes resource context (resourceId, resourceType, spaceId, subResourceId, subResourceType) when the tool operates on a specific resource. Use this to monitor tool performance and correlate tool calls.

Payload

object
  • id string
    Required

    Identifies the event.

  • time string

    Timestamp of when the occurrence happened. Must adhere to RFC 3339.

  • type string
    Required

    Describes the type of event related to the originating occurrence.

  • source string
    Required

    Identifies the context in which an event happened.

  • specversion string
    Required

    The version of the CloudEvents specification which the event uses.

    Can be one of: "1.0"

  • datacontenttype string

    Content type of the data value. Must adhere to RFC 2046 format.

  • userid string
    Required

    The unique identifier for the user related to the event.

  • tenantid string
    Required

    The unique identifier for the tenant related to the event.

  • data object

    The tool execution details, including the tool name, execution time in milliseconds, and any error encountered during execution.

    Show data properties
    • name string
      Required

      The name of the tool that was executed.

    • error string

      Error message if the tool execution failed.

    • baggage string

      W3C Baggage header value forwarded verbatim from the incoming request. Omitted when no baggage header was present on the incoming request.

    • latency integer
      Required

      The time it took to execute the tool, in milliseconds.

    • spaceId string

      The ID of the space associated with the tool call. Omitted when not applicable.

    • billable boolean

      Whether this tool call counts toward consumption/billing. False for tools tagged as excluded from billing capture (e.g. status-polling tools). Consumers computing consumption from this stream should ignore events where billable is false.

    • userAgent string

      Optional. The User-Agent header value from the request that triggered the tool execution, or "unknown" when the header is absent.

    • resourceId string

      The ID of the primary resource the tool operated on (e.g. app ID, dataset ID). Omitted when not applicable.

    • resourceType string

      The type of the primary resource (e.g. "app", "dataset", "automation"). Omitted when not applicable.

    • subResourceId string

      The ID of the sub-resource the tool operated on (e.g. sheet ID, chart ID). Omitted when not applicable.

    • subResourceType string

      The type of the sub-resource (e.g. "sheet", "chart", "dimension"). Omitted when not applicable.

  • clientid string

    The client ID of the OAuth application that requested the tool execution. Absent when the request was made using an impersonated JWT (act claim) without an OAuth client ID.

com.qlik.ai.mcp.tool.executed

Example payload of the "Tool executed" event

{
"id": "id123",
"time": "2018-10-30T07:06:22Z",
"type": "com.qlik.ai.mcp.tool.executed",
"source": "com.qlik/mcp",
"specversion": "1.0",
"datacontenttype": "application/json",
"userid": "ad378d54-3e97-47c0-bc57-cd84dbb93fa2",
"tenantid": "103359ca-3579-4125-a0dc-d19531b53186",
"data": {
"name": "search_datasets",
"latency": 123,
"billable": true
},
"clientid": "client_12345"
}