Serenities AI™
Back to MCP Overview

Account Events Tools

Tools for account-wide events and the triggers that fire flows or agents from them.

10 tools

Available Tools

accountEvents_raise

Raise a custom account event (recorded as custom.<name>) so every "On event" trigger on it — flows, agents, functions — runs. Params: name (e.g. order_ready), subject? {type,id,name}, properties? (≤30 keys), idempotencyKey? (repeats never record twice). Raising it is running those functions: if one of them is not open to you ("Who can run this function"), it is refused and nothing is raised.

Input Schema

namestringrequired

Your own event name, e.g. order_ready (recorded as custom.order_ready)

subjectobject

What it is about

propertiesobject

Details (up to 30 keys, 8 KB)

idempotencyKeystring

Makes retries safe: the same key never records twice

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "accountEvents_raise",
    "arguments": {
          "name": "example",
          "subject": {},
          "properties": {}
    }
  }
}
accountEvents_listEventTriggers

The "On event" triggers of this account. Each is "when <event> happens → run <flow | AI agent | function>": event pattern (a name, source.* or *), conditions, target with its name, on/off, last fired, fire count. Params: targetKind?, targetRef? to list one flow's, agent's or function's triggers.

Input Schema

targetKindstring
targetRefstring

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "accountEvents_listEventTriggers",
    "arguments": {
          "targetKind": "example",
          "targetRef": "example"
    }
  }
}
accountEvents_addEventTrigger

Add an "On event" trigger: the event starts a flow, an AI agent or a function whenever it happens, on the server, whoever caused it. Params: event (e.g. base.row_created, base.*, *), targetKind (flow | agent | account_function | site_function), targetRef (flow id | agent id | account function id | site function id) — site_function is a function of one of your sites, by its id, and only where starting site functions from events is switched on (else refused), filters? — the conditions that narrow it to the exact thing: for base events { property: "databaseId", op: "eq", value } / "tableId" / { property: "changedFields", op: "contains", value: "<Field name>" } (row_updated) / { property: "row.<Field name>", op, value } (rows with these values); for other sources the id property (flowId, agentId, functionId, projectId, folderId, hookId, connectionId, channelId); subject.name, name, source, origin are also addressable. config? ({ triggerId? for flows, task? template for agents with {{event.name}} {{subject.name}} {{properties.x}}, params? for functions }). Check accountEvents_builtins first so the name is real (or use custom.<name>). For a flow prefer a trigger node with triggerType "event" + accountEvents_setFlowEventTrigger. A filter value may be a LIST: contains ["Amount","Status"] = any of them (how "only when one of these fields changes" is stored). For one installed app's event (app.<name>), the trigger names the install it is for: picked by itself when only one installed app could raise it; pass installId (config.installId) when several could — appEventInstalls lists them.

Input Schema

namestring

A label; made from the event and target when omitted

eventstringrequired

An event name (base.row_created), a source pattern (base.*) or * for everything

filtersarray

Only when every filter matches the event properties (subject.name, name, source, origin are also addressable)

targetKindstringrequired

flow | agent | account_function | site_function (a function of one of your sites, by its id; only where switched on)

targetRefstringrequired

flow id | agent id | account function id | site function id

configobject

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "accountEvents_addEventTrigger",
    "arguments": {
          "name": "example",
          "event": "example",
          "filters": {}
    }
  }
}
accountEvents_updateEventTrigger

Change an "On event" trigger: its event, conditions, name, on/off, or config. Params: id, event?, name?, isActive?, filters?, config?. For one installed app's event (app.<name>), the trigger names the install it is for: picked by itself when only one installed app could raise it; pass installId (config.installId) when several could — appEventInstalls lists them.

Input Schema

idstringrequired
namestring
eventstring
isActiveboolean
filtersarray
configobject

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "accountEvents_updateEventTrigger",
    "arguments": {
          "id": "example",
          "name": "example",
          "event": "example"
    }
  }
}
accountEvents_removeEventTrigger

Remove an "On event" trigger. Params: id. Act only on what the person named or picked.

Input Schema

idstringrequired

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "accountEvents_removeEventTrigger",
    "arguments": {
          "id": "example"
    }
  }
}
accountEvents_eventTriggerRuns

What "On event" triggers did: newest first, status queued | ok | failed | skipped with the reason, attempts, the event. Params: triggerId?, limit?.

Input Schema

triggerIdstring
limitinteger

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "accountEvents_eventTriggerRuns",
    "arguments": {
          "triggerId": "example",
          "limit": {}
    }
  }
}
accountEvents_appEventInstalls

The apps installed in this workspace that a trigger on one app's event (app.<name>) can be for, and the one picked by itself (only one installed, or the one this event came from). Params: event.

Input Schema

eventstringrequired

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "accountEvents_appEventInstalls",
    "arguments": {
          "event": "example"
    }
  }
}
accountEvents_appEvents

The events the apps installed in this workspace have sent lately, grouped by app (installId, appName, event names). Use it to see which app.<name> events exist before adding a trigger on one. Params: none.

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "accountEvents_appEvents",
    "arguments": {}
  }
}
accountEvents_setFlowEventTrigger

Bind a flow's Event Trigger node to an account event (upsert; one trigger row per node). Params: flowId, triggerId, event, filters? (same conditions as addEventTrigger). Use after adding a trigger node with triggerType "event" to the flow. For one installed app's event (app.<name>), the trigger names the install it is for: picked by itself when only one installed app could raise it; pass installId (config.installId) when several could — appEventInstalls lists them.

Input Schema

flowIdstringrequired
triggerIdstringrequired
eventstringrequired
filtersarray
installIdstring

For one installed app's event (app.<name>): which install. Picked by itself when only one app is installed (or this event came from one); needed otherwise

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "accountEvents_setFlowEventTrigger",
    "arguments": {
          "flowId": "example",
          "triggerId": "example",
          "event": "example"
    }
  }
}
accountEvents_builtins

Every built-in account event name with its plain-language description. Grouped by source: base (rows written by ANY lane: grid, chat, agent, MCP, API, flow, import), drive, site, flow, agent, function, email, journey, marketplace, billing, connector, channel. Your own events are custom.<name>. Use it before adding an "On event" trigger. There is no event log: what a trigger did is on the trigger (accountEvents_eventTriggerRuns).

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "accountEvents_builtins",
    "arguments": {}
  }
}