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
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | The 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. | |
| recipe | No | 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. | |
| replace | No | Set to true to replace the existing trigger with the same id (needed to change its code or mode). | |
| definition | Yes | The trigger definition: id, name, intent, probe, mode, for, policy, action, target, notify (see the skill). |