Add trigger
trigger_createAdd a trigger to a live task definition (definition: its id, or its type with workspaceId): each time its when happens, Tokenrip starts a task of that definition (its doer, review and instructions). when is one of { kind: task_done, type }, each finish of a task of that type here (completed, approved, or filed done with task_report; a cancel or a failure starts nothing; the type need not have a definition); { kind: schedule, cron, timeZone? }, each due time of a five-field cron expression at least 5 minutes apart, read in timeZone (an IANA zone; omitted: your account's, and an account with none is refused INVALID_INPUT naming when), the latest due time only after a pause and none before the trigger was added; { kind: file_added, folder }, each file created in or moved into that folder of the workspace (its id or slug), started with the file at the version that arrived. A trigger is on once added, and is never edited or deleted: trigger_update turns it off. Only the workspace's owner or a member of the team that owns it adds one (directWork): a guest of any role is refused GUEST_FORBIDDEN, and a retry changes nothing. One trigger per definition and when: another is refused TRIGGER_EXISTS, with details.trigger { id, on } naming the one that holds it. An archived definition is refused INVALID_INPUT naming definition. Past the hourly ceiling on one trigger's starts, its further starts wait (waiting counts them). Returns the trigger whole: its id, definition, when (a schedule's next due time and its expression in words, such as Every Monday at 09:00; a folder's slug and whether it is in the trash), whether it is on, who added it, its last start, how many of its starts wait, and its definition's page in the dashboard.
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>",
"when": "<when>"
},
"name": "trigger_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| why | No | Required for workspace items: one sentence on the goal this change serves, not a description of this edit. Every edit to workspace files, rows, folders and settings takes one (task operations need none); sessions and summaries record themselves from it. At most 300 characters. | |
| when | Yes | When it starts the definition's task: { kind: task_done, type }, a task of that type done; { kind: schedule, cron, timeZone? }, each due time (the latest one only, after a pause; none before the trigger was added or turned on); { kind: file_added, folder }, a file arriving in that folder. Fixed once added. One trigger per definition and when (another is TRIGGER_EXISTS naming it). | |
| definition | Yes | The task definition the trigger starts: its id, or its type when workspaceId is sent. It must be live (an archived one is refused on definition, reason archived). | |
| workspaceId | No | With a type as definition: the workspace (its id or its slug). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trigger | Yes |