Skip to main content
Glama

Add Trigger

add_trigger

You MUST call get_skill_guide('trigger_code') before writing the trigger's code — the qualification rules, sandbox globals, tool surface, and out contract live in the skill. New code runs on the trigger's next firing.

The same goal-sync obligation update_trigger carries applies to creating one: a new scheduled trigger adds recurring behavior the goal doesn't yet describe, and the goal is injected into every turn on this agent. After this call, name what the new trigger does and how often via update_agent(agent_id=..., goal=...) in the same turn. A flow's per-node on_enter triggers are already covered by the goal's sequence description and need no separate mention.

To add a flow node's on_enter enactment — a terminal hook, or re-arming a node whose row was removed — pass an on_enter trigger with the target node_id (any node kind; the node must already exist in the sequence). One on_enter per node — if it already has one, edit that with update_trigger instead of adding a second. On a send or connection-request node, that trigger's prompt holds only extra instructions; the message or note itself goes in the node's message_templates (update_node). Dict with success, agent_id, trigger_id, next_run_at, and the added trigger's full dict under trigger, plus a warning when the agent is paused, since its triggers don't fire until it is set back to active. Read the agent's other triggers via get_agent_details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
triggerYesThe trigger to add. In its prompt, name any outside resource a run reads (a Google Sheet, doc, file, URL) by the identifier its tool takes (the spreadsheet ID and tab, the URL), not only by its title — a later run doesn't see this chat.
agent_idYesID of the agent to add the trigger to
on_behalf_ofNoAn agency client's email, from list_agency_clients, to run this call in that client's account: their agents, settings, connected accounts, and credits. Omit it to act on your own account.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / on_behalf_of
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "An agency client's email, from list_agency_clients, to run this call in that client's account: their agents, settings, connected accounts, and credits. Omit it to act on your own account."
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / trigger / anyOf
      Previous value: -[
      -  {
      -    "description": "Run on a recurring schedule.",
      -    "properties": {
      -      "code": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "days_of_week": {
      -        "anyOf": [
      -          {
      -            "items": {
      -              "type": "integer"
      -            },
      -            "type": "array"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Days to run: 0=Monday through 6=Sunday. Omit for every day."
      -      },
      -      "label": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "prompt": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "time_local": {
      -        "description": "Time of day in user's local timezone, e.g. '09:00'",
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "scheduled",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "time_local"
      -    ],
      -    "title": "ScheduledTrigger",
      -    "type": "object"
      -  },
      -  {
      -    "description": "Run once at a specific time.",
      -    "properties": {
      -      "code": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "label": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "prompt": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "trigger_at": {
      -        "description": "ISO datetime string in UTC, e.g. '2026-03-25T18:00:00Z'",
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "one_time",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "trigger_at"
      -    ],
      -    "title": "OneTimeTrigger",
      -    "type": "object"
      -  },
      -  {
      -    "description": "Run before each calendar meeting.",
      -    "properties": {
      -      "code": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "label": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "minutes_before": {
      -        "default": 15,
      -        "description": "Minutes before meeting start. 5-60.",
      -        "type": "integer"
      -      },
      -      "prompt": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "type": {
      -        "const": "before_meeting",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "title": "BeforeMeetingTrigger",
      -    "type": "object"
      -  },
      -  {
      -    "description": "Run after each calendar meeting ends.",
      -    "properties": {
      -      "code": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "label": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "minutes_after": {
      -        "default": 10,
      -        "description": "Minutes after meeting end. 0-60.",
      -        "type": "integer"
      -      },
      -      "prompt": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "type": {
      -        "const": "after_meeting",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "title": "AfterMeetingTrigger",
      -    "type": "object"
      -  },
      -  {
      -    "description": "Run when a specific event occurs.",
      -    "properties": {
      -      "code": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "label": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "prompt": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "type": {
      -        "enum": [
      -          "new_email",
      -          "all_email",
      -          "sent_email",
      -          "new_calendar_event",
      -          "new_meeting",
      -          "new_linkedin_message",
      -          "new_linkedin_message_from_prospect",
      -          "accepted_linkedin_invitation",
      -          "sent_linkedin_connection_request",
      -          "sent_linkedin_message",
      -          "sent_linkedin_inmail",
      -          "sent_linkedin_comment",
      -          "sent_linkedin_reaction",
      -          "sent_linkedin_follow",
      -          "resolved_profile",
      -          "new_post_engagers",
      -          "calendly_booking",
      -          "calendly_cancellation",
      -          "luma_event_created",
      -          "luma_guest_registered",
      -          "luma_guest_updated"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "title": "EventTrigger",
      -    "type": "object"
      -  },
      -  {
      -    "description": "A sequence node's enactment trigger — fires when a prospect enters `node_id`.\nManaged on any node (including a terminal, as a hook) via add_trigger / update_trigger /\nremove_trigger; define_sequence auto-mints one per enactable node.",
      -    "properties": {
      -      "code": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "label": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "node_id": {
      -        "type": "string"
      -      },
      -      "prompt": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null
      -      },
      -      "type": {
      -        "const": "on_enter",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "node_id"
      -    ],
      -    "title": "OnEnterTrigger",
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "description": "Run on a recurring schedule.",
      +    "properties": {
      +      "code": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "days_of_week": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "type": "integer"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Days to run: 0=Monday through 6=Sunday. Omit for every day."
      +      },
      +      "label": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "prompt": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "time_local": {
      +        "description": "Time of day in user's local timezone, e.g. '09:00'",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "scheduled",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "time_local"
      +    ],
      +    "title": "ScheduledTrigger",
      +    "type": "object"
      +  },
      +  {
      +    "description": "Run once at a specific time.",
      +    "properties": {
      +      "code": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "label": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "prompt": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "trigger_at": {
      +        "description": "ISO datetime string in UTC, e.g. '2026-03-25T18:00:00Z'",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "one_time",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "trigger_at"
      +    ],
      +    "title": "OneTimeTrigger",
      +    "type": "object"
      +  },
      +  {
      +    "description": "Run before each calendar meeting.",
      +    "properties": {
      +      "code": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "label": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "minutes_before": {
      +        "default": 15,
      +        "description": "Minutes before meeting start. 5-60.",
      +        "type": "integer"
      +      },
      +      "prompt": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "type": {
      +        "const": "before_meeting",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "title": "BeforeMeetingTrigger",
      +    "type": "object"
      +  },
      +  {
      +    "description": "Run after each calendar meeting ends.",
      +    "properties": {
      +      "code": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "label": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "minutes_after": {
      +        "default": 10,
      +        "description": "Minutes after meeting end. 0-60.",
      +        "type": "integer"
      +      },
      +      "prompt": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "type": {
      +        "const": "after_meeting",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "title": "AfterMeetingTrigger",
      +    "type": "object"
      +  },
      +  {
      +    "description": "Run when a specific event occurs.",
      +    "properties": {
      +      "code": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "label": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "prompt": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "type": {
      +        "enum": [
      +          "new_email",
      +          "all_email",
      +          "sent_email",
      +          "new_calendar_event",
      +          "new_meeting",
      +          "new_linkedin_message",
      +          "new_linkedin_message_from_prospect",
      +          "accepted_linkedin_invitation",
      +          "sent_linkedin_connection_request",
      +          "sent_linkedin_message",
      +          "sent_linkedin_inmail",
      +          "sent_linkedin_comment",
      +          "sent_linkedin_reaction",
      +          "sent_linkedin_follow",
      +          "resolved_profile",
      +          "new_post_engagers",
      +          "luma_event_created",
      +          "luma_guest_registered",
      +          "luma_guest_updated"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "title": "EventTrigger",
      +    "type": "object"
      +  },
      +  {
      +    "description": "A sequence node's enactment trigger — fires when a prospect enters `node_id`.\nManaged on any node (including a terminal, as a hook) via add_trigger / update_trigger /\nremove_trigger; define_sequence auto-mints one per enactable node.",
      +    "properties": {
      +      "code": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "label": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "node_id": {
      +        "type": "string"
      +      },
      +      "prompt": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "type": {
      +        "const": "on_enter",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "node_id"
      +    ],
      +    "title": "OnEnterTrigger",
      +    "type": "object"
      +  }
      +]
  3. Changed1 schema field changed
    • changedInput schema / properties / trigger / description
      Previous value: -"The trigger to add"New value: +"The trigger to add. In its prompt, name any outside resource a run reads (a Google Sheet, doc, file, URL) by the identifier its tool takes (the spreadsheet ID and tab, the URL), not only by its title — a later run doesn't see this chat."
  4. Changed3 schema fields changed
    • addedInput schema / properties / agent_id
      Added value: +{
      +  "description": "ID of the agent to add the trigger to",
      +  "type": "integer"
      +}
    • removedInput schema / properties / task_id
      Removed value: -{
      -  "description": "ID of the task to add the trigger to",
      -  "type": "integer"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "task_id",
      -  "trigger"
      -]New value: +[
      +  "agent_id",
      +  "trigger"
      +]
  5. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare write=false/destructive=false; the description goes far beyond by disclosing that new code runs on next firing, that the goal is injected into every turn (goal-sync obligation), that paused agents' triggers don't fire, and that one on_enter per node is enforced. This is exactly the extra context annotations can't provide.

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?

Front-loaded with the core action and routing before the dense operational detail. It is long and paragraph-heavy, and a few clauses could be tightened, but each paragraph carries distinct, non-redundant guidance.

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

Completeness5/5

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

No output schema exists, and the description compensates with a <returns> section enumerating success, ids, next_run_at, the trigger dict, and the paused-agent warning. Combined with the code prerequisite and goal-sync obligation, an agent has everything needed to call it correctly.

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 baseline is 3, but the description adds genuine meaning beyond the schema: how the `prompt` field should reference outside resources by tool identifier, the `node_id`/on_enter constraint, and that code requires the skill guide. It enriches the multi-variant trigger field rather than just restating it.

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?

States a specific verb+resource ('Add a trigger to an existing agent') and immediately distinguishes from siblings by contrasting with creating a new agent and pointing to update_trigger for existing on_enter triggers. An agent can tell this apart from update_trigger/remove_trigger/define_sequence without opening any schema.

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

Usage Guidelines5/5

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

Gives explicit when/when-not and alternatives: prefer over creating a new agent, use update_trigger instead when an on_enter already exists, use update_node for message content, and a hard prerequisite to call get_skill_guide('trigger_code') before writing code. Nothing is left to inference.

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.

Resources