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
  • idstring
    Required

    Identifies the event.

  • timestring

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

  • typestring
    Required

    Describes the type of event related to the originating occurrence.

  • sourcestring
    Required

    Identifies the context in which an event happened.

  • specversionstring
    Required

    The version of the CloudEvents specification which the event uses.

    Can be one of: "1.0"

  • datacontenttypestring

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

  • useridstring
    Required

    The unique identifier for the user related to the event.

  • tenantidstring
    Required

    The unique identifier for the tenant related to the event.

  • dataobject

    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
    • eventIdsarray 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.

    • toolCountinteger
      Required

      The number of tool calls aggregated in this event.

    • totalLatencyMsinteger
      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
  • idstring
    Required

    Identifies the event.

  • timestring

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

  • typestring
    Required

    Describes the type of event related to the originating occurrence.

  • sourcestring
    Required

    Identifies the context in which an event happened.

  • specversionstring
    Required

    The version of the CloudEvents specification which the event uses.

    Can be one of: "1.0"

  • datacontenttypestring

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

  • useridstring
    Required

    The unique identifier for the user related to the event.

  • tenantidstring
    Required

    The unique identifier for the tenant related to the event.

  • dataobject

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

    Show data properties
    • namestring
      Required

      The name of the tool that was executed.

    • errorstring

      Error message if the tool execution failed.

    • baggagestring

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

    • latencyinteger
      Required

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

    • spaceIdstring

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

    • billableboolean

      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.

    • userAgentstring

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

    • resourceIdstring

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

    • resourceTypestring

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

    • subResourceIdstring

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

    • subResourceTypestring

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

  • clientidstring

    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"
}