---
source: https://qlik.dev/apis/event/ai/mcps/
last_updated: 2026-04-23T17:22:43+01:00
---

# Mcps

## Table of Contents

### system-events.ai.mcp

- [com.qlik.ai.mcp.tool.calls.aggregated](#comqlikaimcptoolcallsaggregated)
- [com.qlik.ai.mcp.tool.executed](#comqlikaimcptoolexecuted)

## Events published on the `system-events.ai.mcp` channel

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

**Title:** Tool calls aggregated

**Action:** `send`

**Visibility:** `public`

**Stability:** `stable`

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**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | Identifies the event. Metadata: minLength = 1. |
| `time` | `string` | No | Timestamp of when the occurrence happened. Must adhere to RFC 3339. Metadata: minLength = 1, format = "date-time". |
| `source` | `string` | Yes | Identifies the context in which an event happened. Metadata: minLength = 1, format = "uri-reference", default = "com.qlik/mcp". |
| `specversion` | `string` | Yes | The version of the CloudEvents specification which the event uses. Allowed values: 1.0. Metadata: minLength = 1, default = "1.0". |
| `datacontenttype` | `string` | No | Content type of the data value. Must adhere to RFC 2046 format. Metadata: minLength = 1, default = "application/json". |
| `userid` | `string` | Yes | The unique identifier for the user related to the event. Metadata: format = "uuid". |
| `tenantid` | `string` | Yes | The unique identifier for the tenant related to the event. Metadata: format = "uuid". |
| `data` | `object` | No | The aggregated metrics for a batch of tool calls, including the count of tools executed, cumulative latency across all calls, and references to individual tool execution events for traceability. |
| `type` | `string` | Yes | The event type identifier, following CloudEvents specification. Metadata: default = "com.qlik.ai.mcp.tool.calls.aggregated". |

<details>
<summary>Properties of `data`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `eventIds` | `string[]` | Yes | 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` | Yes | The number of tool calls aggregated in this event. |
| `totalLatencyMs` | `integer` | Yes | The total execution latency across all aggregated tool calls, in milliseconds. |

</details>


**Example**

```json
{
  "id": "id123",
  "time": "2018-10-30T07:06:22Z",
  "source": "com.qlik/mcp",
  "specversion": "1.0",
  "datacontenttype": "application/json",
  "userid": "ad378d54-3e97-47c0-bc57-cd84dbb93fa2",
  "tenantid": "103359ca-3579-4125-a0dc-d19531b53186",
  "data": {
    "eventIds": [
      "01JKQZ6X8YABCDEF1234567890",
      "01JKQZ6X8YABCDEF1234567891",
      "01JKQZ6X8YABCDEF1234567892",
      "01JKQZ6X8YABCDEF1234567893",
      "01JKQZ6X8YABCDEF1234567894"
    ],
    "toolCount": 5,
    "totalLatencyMs": 1245
  },
  "type": "com.qlik.ai.mcp.tool.calls.aggregated"
}
```


### com.qlik.ai.mcp.tool.executed

**Title:** Tool executed

**Action:** `send`

**Visibility:** `public`

**Stability:** `stable`

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. Use this to monitor tool performance and correlate tool calls.


**Payload**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | Identifies the event. Metadata: minLength = 1. |
| `time` | `string` | No | Timestamp of when the occurrence happened. Must adhere to RFC 3339. Metadata: minLength = 1, format = "date-time". |
| `source` | `string` | Yes | Identifies the context in which an event happened. Metadata: minLength = 1, format = "uri-reference", default = "com.qlik/mcp". |
| `specversion` | `string` | Yes | The version of the CloudEvents specification which the event uses. Allowed values: 1.0. Metadata: minLength = 1, default = "1.0". |
| `datacontenttype` | `string` | No | Content type of the data value. Must adhere to RFC 2046 format. Metadata: minLength = 1, default = "application/json". |
| `userid` | `string` | Yes | The unique identifier for the user related to the event. Metadata: format = "uuid". |
| `tenantid` | `string` | Yes | The unique identifier for the tenant related to the event. Metadata: format = "uuid". |
| `data` | `object` | No | The tool execution details, including the tool name, execution time in milliseconds, and any error encountered during execution. |
| `type` | `string` | Yes | The event type identifier, following CloudEvents specification. Metadata: default = "com.qlik.ai.mcp.tool.executed". |
| `clientid` | `string` | No | The client ID of the OAuth application that requested the tool execution. |

<details>
<summary>Properties of `data`</summary>

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | Yes | The name of the tool that was executed. |
| `error` | `string` | No | Error message if the tool execution failed. |
| `latency` | `integer` | Yes | The time it took to execute the tool, in milliseconds. |

</details>


**Example**

```json
{
  "id": "id123",
  "time": "2018-10-30T07:06:22Z",
  "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
  },
  "type": "com.qlik.ai.mcp.tool.executed",
  "clientid": "client_12345"
}
```


## Schemas

### cloudEvents

CloudEvents Specification Schema

**Type:** `object`

**Properties**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | Identifies the event. Metadata: minLength = 1. |
| `time` | `string` | No | Timestamp of when the occurrence happened. Must adhere to RFC 3339. Metadata: minLength = 1, format = "date-time". |
| `source` | `string` | Yes | Identifies the context in which an event happened. Metadata: minLength = 1, format = "uri-reference", default = "com.qlik/mcp". |
| `specversion` | `string` | Yes | The version of the CloudEvents specification which the event uses. Allowed values: 1.0. Metadata: minLength = 1, default = "1.0". |
| `datacontenttype` | `string` | No | Content type of the data value. Must adhere to RFC 2046 format. Metadata: minLength = 1, default = "application/json". |



### extensions

Custom extensions for MCP events containing tenant and user context.

**Type:** `object`

**Properties**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `userid` | `string` | Yes | The unique identifier for the user related to the event. Metadata: format = "uuid". |
| `tenantid` | `string` | Yes | The unique identifier for the tenant related to the event. Metadata: format = "uuid". |


