Skip to main content
Glama

Add trigger

trigger_create

Add 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

NameRequiredDescriptionDefault
whyNoRequired 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.
whenYesWhen 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).
definitionYesThe 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).
workspaceIdNoWith a type as definition: the workspace (its id or its slug).

Output Schema

NameRequiredDescriptionDefault
triggerYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / when / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "kind": {
      -        "const": "task_done",
      -        "type": "string"
      -      },
      -      "type": {
      -        "description": "The task type it listens for (lowercase letters, digits, - and _, starting with a letter or a digit, at most 64 characters): a task of that type in the workspace completed, approved or filed as a record of work starts the definition's task. It need not have a definition. Not a cancel.",
      -        "pattern": "^[a-z0-9][a-z0-9-_]{0,63}$",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "type"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "cron": {
      -        "description": "A standard five-field cron expression, minute hour day-of-month month weekday (0 9 * * 1 is Mondays at 09:00; 0 9,17 * * * twice a day). Each field is *, a number, a range or a list, each with an optional /step; month and weekday names (jan, mon) are accepted, weekday 0 and 7 are Sunday; when both day of month and weekday are given, a day matching either is due. Seconds, @ names, L, W, # and ? are refused. Due times at least 5 minutes apart, at most 100 characters.",
      -        "maxLength": 100,
      -        "type": "string"
      -      },
      -      "kind": {
      -        "const": "schedule",
      -        "type": "string"
      -      },
      -      "timeZone": {
      -        "description": "The IANA time zone the expression is read in (America/New_York, Europe/Berlin, UTC). Omit for your account's own zone; an account with none must name one. A clock change: a skipped time is due at the first moment after it, a repeated one once.",
      -        "maxLength": 64,
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "cron"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "folder": {
      -        "description": "The folder: its id, or its slug in the definition's workspace. A live folder of that workspace (one in the trash is refused): a file created in it (published, uploaded, forked or adopted into it) or moved into it starts the definition's task, with that file at the version that arrived. A new version, a restore from the trash and a folder restored start nothing.",
      -        "type": "string"
      -      },
      -      "kind": {
      -        "const": "file_added",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "folder"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "kind": {
      +        "const": "task_done",
      +        "type": "string"
      +      },
      +      "type": {
      +        "description": "The task type it listens for (letters in any case (kept lowercase), digits, - and _, starting with a letter or a digit, at most 64 characters): a task of that type in the workspace completed, approved or filed as a record of work starts the definition's task. It need not have a definition. Not a cancel.",
      +        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_]{0,63}$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "cron": {
      +        "description": "A standard five-field cron expression, minute hour day-of-month month weekday (0 9 * * 1 is Mondays at 09:00; 0 9,17 * * * twice a day). Each field is *, a number, a range or a list, each with an optional /step; month and weekday names (jan, mon) are accepted, weekday 0 and 7 are Sunday; when both day of month and weekday are given, a day matching either is due. Seconds, @ names, L, W, # and ? are refused. Due times at least 5 minutes apart, at most 100 characters.",
      +        "maxLength": 100,
      +        "type": "string"
      +      },
      +      "kind": {
      +        "const": "schedule",
      +        "type": "string"
      +      },
      +      "timeZone": {
      +        "description": "The IANA time zone the expression is read in (America/New_York, Europe/Berlin, UTC). Omit for your account's own zone; an account with none must name one. A clock change: a skipped time is due at the first moment after it, a repeated one once.",
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "cron"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "folder": {
      +        "description": "The folder: its id, or its slug in the definition's workspace. A live folder of that workspace (one in the trash is refused): a file created in it (published, uploaded, forked or adopted into it) or moved into it starts the definition's task, with that file at the version that arrived. A new version, a restore from the trash and a folder restored start nothing.",
      +        "type": "string"
      +      },
      +      "kind": {
      +        "const": "file_added",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "folder"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / why / description
      Previous value: -"Required for workspace items: one sentence on what the person is trying to accomplish, in their terms, not a description of this edit. Every workspace write takes one; sessions and summaries record themselves from it. At most 300 characters."New value: +"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."
  2. Changed1 schema field changed
    • addedOutput schema / properties / trigger / properties / addedBy / properties / tokenrip
      Added value: +{
      +  "const": true,
      +  "description": "Present only when true: this is Tokenrip itself, doing a task definition's routine. It is a member of no workspace and never you.",
      +  "type": "boolean"
      +}
  3. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare a non-read-only, non-destructive, non-idempotent, closed-world write; the description goes far beyond that with error codes (GUEST_FORBIDDEN, TRIGGER_EXISTS with details.trigger, INVALID_INPUT on archived definition or missing account time zone), the one-per-definition-and-when uniqueness rule, and the hourly start ceiling with waiting behavior. The "a retry changes nothing" note explains the effective no-op on refused retries, which is consistent with, not contrary to, the annotations.

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

Conciseness3/5

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

The tool's purpose is front-loaded, but the body is a single dense paragraph of semicolon- and parenthesis-chained clauses that is hard to scan. Several details (cron field rules, time-zone skip/repeat behavior, folder arrival nuances) largely restate the schema descriptions, so the length is not fully earned.

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?

For a creation tool with side effects, permission constraints, and multiple when variants, the description covers preconditions, failure modes, and lifecycle. An output schema exists, so the added return-value sentence is a bonus rather than a necessity, and nothing an agent needs to call it correctly is missing.

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 meaning for required parameters: definition must be live or it is refused on definition, workspaceId is only needed when definition is given as a type, and each when.kind's runtime implication is spelled out (a cancel or failure starts nothing; the listened-for type need not have a definition; folder arrival version semantics).

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 and resource ("Add a trigger to a live task definition") and immediately defines the trigger concept: a when that starts a task of that definition. It distinguishes itself from trigger_update explicitly ("is never edited or deleted: trigger_update turns it off"), so an agent can route correctly without inspecting schemas.

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 concrete context for correct use: who may add one ("Only the workspace's owner or a member of the team that owns it"), and names the sibling alternative for the mutation this tool does not perform (trigger_update to turn off). It stops short of stating explicit when-not-to-use conditions versus the read siblings (trigger_get, trigger_list), but the scope is otherwise unambiguous.

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.