Analytics Governance
Analytics Governance defines and validates the event taxonomy that product teams and agents use before data reaches dashboards or BI workflows.
What it does
The module stores workspace tracking-plan definitions for events, properties, owners, validation rules, and change history. It is separate from Data & Insights: governance describes what should be tracked, while Data & Insights stores Object Analytics, insight views, Custom BI assets, exports, and scheduled artifact definitions.
Public capabilities
- Define analytics events.
- Define reusable event properties.
- List event definitions by owner or query.
- Validate event payloads against the workspace tracking plan.
- Keep governance changes tenant-scoped, audited, and available through REST and MCP.
Permissions
Use analytics:read to list event and property definitions and tracking plans. Use analytics:write to define events, define properties, validate event payloads, and create, update, or archive tracking plans.
Validation checks the rules a property definition declares: required, types, and enum. Rules outside that set are returned in unsupported_rules rather than silently passing, so a payload reported as valid has only been checked against rules Slab5 actually evaluates.
MCP tools
define_event
Define an analytics event in the workspace tracking plan, including the property keys it expects and the validation rules validate_event applies to payloads.
- Required scopes
- analytics:write
- API equivalent
- POST /v1/analytics/events
Example prompt
Input schema
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Event name, such as workspace_created. |
| description | string | No | Human-readable event purpose. |
| owner | string | No | Person or team responsible for the event definition. |
| properties | array | No | Property keys expected on the event. |
| idempotency_key | string | No | Stable client-generated key that makes retries safe for this write. |
| validation_rules | object | No | Governance rules evaluated by validate_event. Supported kinds: required (array of property keys that must be present), types (map of property key to string|number|boolean|object|array), enum (map of property key to allowed values). Any other kind is stored but reported back as unsupported rather than silently applied. |
| tracking_plan_id | string | No | Tracking plan this definition belongs to. |
Additional properties are rejected.
Example input
{
"name": "first_contact_created",
"description": "A workspace created its first CRM contact.",
"owner": "growth",
"properties": [
"tenant_id",
"workspace_id",
"source"
]
}Example response
{
"event": {
"id": "evt_123",
"name": "first_contact_created"
},
"request_id": "req_139"
}Common errors
The token does not include the scope required for this operation.
The request payload failed schema validation.
The idempotency key was reused with a different request body.
list_events
List analytics event definitions in the workspace tracking plan.
- Required scopes
- analytics:read
- API equivalent
- GET /v1/analytics/events
Example prompt
Input schema
| Property | Type | Required | Description |
|---|---|---|---|
| query | string | No | Free-text search across event names and descriptions. |
| owner | string | No | Restrict results to one owner. |
| limit | integer · min 1 · max 100 | No | Maximum number of events to return. |
| cursor | string | No | Opaque cursor from a previous response's next_cursor. |
Additional properties are rejected.
Example input
{
"owner": "growth",
"limit": 25
}Example response
{
"events": [
{
"id": "evt_123",
"name": "first_contact_created",
"owner": "growth"
}
],
"request_id": "req_140"
}Common errors
The token does not include the scope required for this operation.
The request payload failed schema validation.
define_property
Define a reusable analytics property for the tracking plan.
- Required scopes
- analytics:write
- API equivalent
- POST /v1/analytics/properties
Example prompt
Input schema
| Property | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | Property key used in tracked events. |
| type | string · string | number | boolean | datetime | object | array | Yes | Expected property value type. |
| description | string | No | Human-readable property meaning. |
| required | boolean · default false | No | Whether this property is required when associated with an event. |
| idempotency_key | string | No | Stable client-generated key that makes retries safe for this write. |
| tracking_plan_id | string | No | Tracking plan this definition belongs to. |
Additional properties are rejected.
Example input
{
"key": "workspace_id",
"type": "string",
"description": "Workspace identifier associated with the event.",
"required": true
}Example response
{
"property": {
"id": "prop_123",
"key": "workspace_id",
"type": "string"
},
"request_id": "req_141"
}Common errors
The token does not include the scope required for this operation.
The request payload failed schema validation.
The idempotency key was reused with a different request body.
validate_event
Validate an event payload against its definition in the workspace tracking plan. Checks the expected property keys and the event's stored validation rules. The result reports which rule kinds were evaluated and names any that were stored but not applied, so a valid result is not mistaken for an unchecked one.
- Required scopes
- analytics:read
- API equivalent
- POST /v1/analytics/events/validate
Example prompt
Input schema
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Event name to validate. |
| properties | object | Yes | Event payload properties to validate. |
Additional properties are rejected.
Example input
{
"name": "first_contact_created",
"properties": {
"tenant_id": "ten_123",
"workspace_id": "wrk_123",
"source": "mcp"
}
}Example response
{
"valid": true,
"errors": [],
"request_id": "req_142"
}Common errors
The token does not include the scope required for this operation.
The request payload failed schema validation.
The requested resource does not exist in this workspace.
create_tracking_plan
Create a tracking plan to group the event and property definitions that belong to one product surface or release. Events and properties reference a plan by tracking_plan_id; a plan is the grouping, not the owner, so archiving it leaves their definitions intact.
- Required scopes
- analytics:write
- API equivalent
- POST /v1/analytics/tracking-plans
Input schema
| Property | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | Stable identifier, unique within the workspace. |
| name | string | Yes | No description yet. |
| description | string | No | No description yet. |
| status | string · draft | active | archived | No | No description yet. |
| metadata | object | No | No description yet. |
| idempotency_key | string | No | No description yet. |
Additional properties are rejected.
Example input
Example response
Common errors
The token does not include the scope required for this operation.
The request payload failed schema validation.
The idempotency key was reused with a different request body.
list_tracking_plans
List tracking plans in the workspace. An empty list means none has been defined, which is a real answer rather than a failure.
- Required scopes
- analytics:read
- API equivalent
- GET /v1/analytics/tracking-plans
Input schema
| Property | Type | Required | Description |
|---|---|---|---|
| status | string · draft | active | archived | No | No description yet. |
| query | string | No | Free-text search across key, name and description. |
| limit | integer · min 1 · max 100 | No | No description yet. |
| cursor | string | No | No description yet. |
Additional properties are rejected.
Example input
Example response
Common errors
The token does not include the scope required for this operation.
The request payload failed schema validation.
update_tracking_plan
Rename a tracking plan, revise its description, or move it between draft, active and archived. At least one field must change.
- Required scopes
- analytics:write
- API equivalent
- PATCH /v1/analytics/tracking-plans/{tracking_plan_id}
Input schema
| Property | Type | Required | Description |
|---|---|---|---|
| tracking_plan_id | string | Yes | No description yet. |
| name | string | No | No description yet. |
| description | string | No | No description yet. |
| status | string · draft | active | archived | No | No description yet. |
| metadata | object | No | No description yet. |
Additional properties are rejected.
Example input
Example response
Common errors
The token does not include the scope required for this operation.
The request payload failed schema validation.
The requested resource does not exist in this workspace.
archive_tracking_plan
Archive a tracking plan. Events and properties that reference it keep their definitions and their reference; the plan simply stops appearing in reads.
- Required scopes
- analytics:write
- API equivalent
- DELETE /v1/analytics/tracking-plans/{tracking_plan_id}
Input schema
| Property | Type | Required | Description |
|---|---|---|---|
| tracking_plan_id | string | Yes | No description yet. |
Additional properties are rejected.
Example input
Example response
Common errors
The token does not include the scope required for this operation.
The request payload failed schema validation.
The requested resource does not exist in this workspace.