Skip to main content
Glama

trigger_draft

Submit a new trigger or version as a draft to validate its definition, save probe code, and run a one-time trial before activation.

Instructions

Submit a new trigger, or a new version of one, as a draft. The engine checks the definition, saves the probe code and runs the probe once. Returns the draft id, the trial run result, warnings and a plain-language description. Nothing runs on a schedule until trigger_activate. Pass either code you wrote or a ready-made recipe from trigger_recipes. Follow the self-starter:triggers skill when writing the definition and the probe.

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": {
      "definition": "<definition>"
    },
    "name": "trigger_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNoThe probe's TypeScript source for Deno. It reads one JSON object on stdin and prints one JSON object on stdout. Unless the definition sets probe.access to sandbox, it runs with the user's permissions: files, commands, any network. Leave it out when using a recipe.
recipeNoId of a ready-made recipe from trigger_recipes, such as github-ci, log-watch, http-health, futu-news or ibkr-account. The recipe supplies the code, access, permissions and mode; set its parameters in definition.probe.params.
replaceNoSet to true to replace the existing trigger with the same id (needed to change its code or mode).
definitionYesThe trigger definition: id, name, intent, probe, mode, for, policy, action, target, notify (see the skill).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.1
    • changedInput schema / properties / recipe / description
      Previous value: -"Id of a ready-made recipe from trigger_recipes, such as ibkr-account. The recipe supplies the code, access, permissions and mode; set its parameters in definition.probe.params."New value: +"Id of a ready-made recipe from trigger_recipes, such as github-ci, log-watch, http-health, futu-news or ibkr-account. The recipe supplies the code, access, permissions and mode; set its parameters in definition.probe.params."
  2. First observedv0.0.7

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false, destructiveHint=false, openWorldHint=true. The description goes much further: the definition is validated, probe code is persisted, the probe executes once with the user's filesystem, command and network permissions, and the response carries draft id, trial result, warnings and prose. The "nothing runs on a schedule until trigger_activate" line is exactly the safety boundary an agent needs.

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

Conciseness5/5

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

Front-loaded with the action, then side effects, then return values, then the code-vs-recipe choice, then the authoring pointer. Every sentence carries distinct information and none restates the tool name or title.

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?

There is no output schema, so the description enumerates the return payload itself (draft id, trial result, warnings, plain-language description). The nested definition object is delegated to the named skill plus the recipe path, which is adequate for a tool with a required nested parameter.

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?

With 100% schema coverage the baseline is 3, but the description adds real meaning: code and recipe are alternatives, a recipe supplies code, access, permissions and mode with parameters set in definition.probe.params, and replace must be true to change code or mode. Those are cross-parameter interactions the schema cannot express.

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?

"Submit a new trigger, or a new version of one, as a draft" names a specific verb and resource, and the description immediately scopes what the engine does (validate, save probe code, run once) and what it does not (nothing scheduled until trigger_activate). An agent can distinguish this from trigger_activate or trigger_get without opening a schema.

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?

It gives two concrete usage paths – hand-written code or a recipe from trigger_recipes – and states the pre-activation condition. It also points to the self-starter:triggers skill for authoring the definition. It stops short of explicitly contrasting draft-with-replace against trigger_update, which is the one sibling where an agent could hesitate.

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