Serenities AI™
Back to MCP Overview

Site Events Tools

Tools for a site’s event log and catalog — what a site can react to.

5 tools

Available Tools

events_catalog

List the events a site can react to. Returns every event name seen so far (built-in and custom) with counts, the property keys observed, first/last seen, plus the built-in names not sent yet. Param: projectId. Use this before writing a journey or an automation so you reference real event names.

Input Schema

projectIdstringrequired

Site (project) id

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "events_catalog",
    "arguments": {
          "projectId": "example"
    }
  }
}
events_describe

Set or clear the plain-language description of a custom event in the catalog so people understand it. Params: projectId, name, description (null to clear). The event must have been seen at least once.

Input Schema

projectIdstringrequired
namestringrequired
descriptionstringrequired

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "events_describe",
    "arguments": {
          "projectId": "example",
          "name": "example",
          "description": "example"
    }
  }
}
events_getSettings

Read which events a site records. Returns builtin (name → on/off, all on by default), tables (tableId → { row_created, row_updated: true or a list of field ids, row_deleted }, off by default), anonymousBeacon (accept events from visitors who are not signed in). Param: projectId.

Input Schema

projectIdstringrequired

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "events_getSettings",
    "arguments": {
          "projectId": "example"
    }
  }
}
events_updateSettings

Change which events a site records. Params: projectId, settings ({ builtin?, tables?, anonymousBeacon? } — partial objects merge; a table entry with all flags false removes it). Example: opt an orders table's status changes in: { tables: { "<tableId>": { row_updated: ["<statusFieldId>"] } } }. Switch a noisy built-in off: { builtin: { member_logged_in: false } }.

Input Schema

projectIdstringrequired
settingsobjectrequired

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "events_updateSettings",
    "arguments": {
          "projectId": "example",
          "settings": {}
    }
  }
}
events_emit

Record a custom event for a site by hand or from an agent, the same path a site's own code uses. Params: projectId, name (e.g. cart_abandoned), subjectId? (site member id), properties? (small JSON object), idempotencyKey? (repeat-safe). Journeys and automations that listen for the name will fire. Do NOT use this to fake built-in events; the platform records those itself. Emitting it is running the functions those automations start: if one of them is not open to you ("Who can run this function"), it is refused and nothing is recorded.

Input Schema

projectIdstringrequired
namestringrequired
subjectIdstring
propertiesobject
idempotencyKeystring

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "events_emit",
    "arguments": {
          "projectId": "example",
          "name": "example",
          "subjectId": "example"
    }
  }
}