Skip to main content
Glama

Set Plan Trigger

set_plan_trigger

Make a plan fire on its own when something changes in the CRM, change such a trigger, or remove it. A trigger watches one object (account, contact, lead, opportunity, case or user) for one kind of change: 'enters' (a record now matches filter_spec, a filter in the shape runs use, and did not before, e.g. an opportunity whose stage becomes Closed Won), 'changes' (any change to the named fields), or 'created' (a record the CRM creates from now on, optionally matching filter_spec). Changes LiveCRM itself makes do not fire it unless fire_on_livecrm is true. With scope_mode 'matched' (the default) each firing runs the plan's runs on just the records that changed, or the accounts, contacts or opportunities linked to them; 'plan' fires the plan as it stands. Changes are gathered for batch_window_seconds (default 0: it fires on the first change) into one firing of at most max_records records (default 500), at most max_firings_per_day times a day (default 48). ONCE SET, EVERY FIRING RUNS WITH NOBODY CONFIRMING IT, so read the plan with get_plan first. Setting a trigger needs every permission the plan's steps call, and each firing runs with your permissions as they stand when it fires. Only an active plan takes a trigger. action 'update' replaces the whole definition of trigger_id; 'remove' deletes it. get_plan lists a plan's triggers.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "plan_id": "<plan_id>",
      "connection_id": "<connection_id>"
    },
    "name": "set_plan_trigger"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoWhat it watches for. Required for add and update.
nameNoWhat a person calls it.
stateNoinactive keeps the trigger without firing it. Default active.
actionNoadd (default), update or remove.
fieldsNoFor 'changes': the fields to watch, by their filterable names.
plan_idYesThe plan the trigger fires.
scope_modeNomatched (default): the changed records; plan: the plan as it stands; slice: on the Subscription plan's account triggers only, each account becomes a Subscription run for its missing personas.
trigger_idNoThe trigger to update or remove.
filter_specNoFor 'enters' (required) and 'created' (optional): a filter over object_type, as runs take. Call list_filterable_fields first.
max_recordsNo1 to 10000. Default 500.
object_typeNoThe object it watches. Required for add and update.
connection_idYesThe CRM connection. Call list_crm_connections first.
fire_on_livecrmNoFire on changes LiveCRM itself makes too. Default false.
match_ttl_hoursNo1 to 720. How long a caught record waits before it expires. Default 168.
max_firings_per_dayNo1 to 1440. Default 48.
batch_window_secondsNo0 to 86400. Default 0, which fires on the first change.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / scope_mode / description
      Previous value: -"matched (default): the changed records; plan: the plan as it stands."New value: +"matched (default): the changed records; plan: the plan as it stands; slice: on the Subscription plan's account triggers only, each account becomes a Subscription run for its missing personas."
    • changedInput schema / properties / scope_mode / enum
      Previous value: -[
      -  "matched",
      -  "plan"
      -]New value: +[
      +  "matched",
      +  "plan",
      +  "slice"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / batch_window_seconds / description
      Previous value: -"0 to 86400. Default 300."New value: +"0 to 86400. Default 0, which fires on the first change."
  3. Added

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations: it discloses that firings execute with no human confirmation, that the setter needs every permission the plan's steps call, that each firing runs with the caller's permissions as they stand at fire time, that LiveCRM-made changes do not fire unless fire_on_livecrm is true, and that 'update' replaces the entire definition. Batch/rate behavior (batching window, max_records, daily cap) is also spelled out. The only tension is 'remove' deleting a definition while destructiveHint is false, but that reads as config deletion rather than data destruction rather than a contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense but front-loaded: the what-it-does sentence comes first, then semantics, then the safety warning about unattended firing. A few schema defaults are duplicated in prose, and the single unbroken paragraph makes 16-parameter semantics harder to scan than a short bulleted list would.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-parameter, nested-spec, open-world mutation tool with no output schema, the description covers the risky and non-obvious parts: unattended execution, permission requirements, action semantics, and where to find existing triggers (get_plan). It does not state what a successful add returns (e.g. an id usable as trigger_id later), which an agent must guess or re-discover via get_plan.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3, but the description adds genuine semantics: it defines what 'enters' means in terms of filter_spec matching transitions (with a Closed Won example), what 'changes' vs 'created' watch, and how scope_mode 'matched' selects changed records vs linked accounts/contacts/opportunities. Defaults for batch_window_seconds, max_records and max_firings_per_day are restated from the schema, which is mild redundancy rather than added value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource: makes a plan fire on its own when a CRM object changes, and covers the add/update/remove variants in the same sentence. The scope (event-driven firing of a plan) is distinct enough from a schedule-setting sibling that an agent can tell which one to reach for.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives real prerequisites and named companion calls: 'read the plan with get_plan first', 'Call list_filterable_fields first', 'Call list_crm_connections first', and 'Only an active plan takes a trigger'. It does not explicitly contrast trigger-based firing with the time-based alternative (set_plan_schedule), so the choice between the two is left implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.