Skip to main content
Glama

Update automation

update_automation
Destructive

Edit an automation (name, sender or category, trigger incl. trigger.cooldown_seconds, or steps). steps replaces every step; step replaces just the one with its id. Pass if_updated_at (the updated_at you read): an edit made by someone else since then answers 409 instead of being overwritten.

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": {
      "id": "<id>"
    },
    "name": "update_automation"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesAutomation id
fromNoOne of your numbers, to pin the flow to it. Leave it out and TextKit picks a number approved for `category`. A sandbox number makes it a sandbox flow.
nameNoAutomation name
stepNoOne of: send_sms {body, from?, send_time?, max_wait_seconds?}; wait {seconds}; wait_for_event {event, timeout_seconds, on_received, on_timeout}; condition {check, on_met, on_not_met}; end. Branches are "continue", "end", or "goto:<id of a later step>".
stepsNoReplaces every step.
triggerNoWhat starts a run: an event, with optional filters
categoryNoWhat it sends: marketing, alerts (transactional) or codes (otp). With no `from`, TextKit picks a number approved for this. Falls back to a built-in topic.
topic_idNoSkip recipients unsubscribed from this topic.
if_updated_atNoThe automation's `updated_at` as you read it. If it changed since (another edit), nothing is saved and the answer is 409: read it again and redo the edit on the latest.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / step / description
      Previous value: -"One of: send_sms {body, from?}; wait {seconds}; wait_for_event {event, timeout_seconds, on_received, on_timeout}; condition {check, on_met, on_not_met}; end. Branches are \"continue\", \"end\", or \"goto:<id of a later step>\"."New value: +"One of: send_sms {body, from?, send_time?, max_wait_seconds?}; wait {seconds}; wait_for_event {event, timeout_seconds, on_received, on_timeout}; condition {check, on_met, on_not_met}; end. Branches are \"continue\", \"end\", or \"goto:<id of a later step>\"."
    • addedInput schema / properties / step / properties / max_wait_seconds
      Added value: +{
      +  "description": "send_sms with optimal_user_time, required: the longest this text may wait for that hour",
      +  "maximum": 86400,
      +  "minimum": 60,
      +  "type": "integer"
      +}
    • addedInput schema / properties / step / properties / send_time
      Added value: +{
      +  "description": "send_sms: `optimal_user_time` waits for the hour this person usually replies or clicks, inside quiet hours. Default: right_away. Refused for one-time codes and order or shipping texts.",
      +  "enum": [
      +    "right_away",
      +    "optimal_user_time"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / steps / items / description
      Previous value: -"One of: send_sms {body, from?}; wait {seconds}; wait_for_event {event, timeout_seconds, on_received, on_timeout}; condition {check, on_met, on_not_met}; end. Branches are \"continue\", \"end\", or \"goto:<id of a later step>\"."New value: +"One of: send_sms {body, from?, send_time?, max_wait_seconds?}; wait {seconds}; wait_for_event {event, timeout_seconds, on_received, on_timeout}; condition {check, on_met, on_not_met}; end. Branches are \"continue\", \"end\", or \"goto:<id of a later step>\"."
    • addedInput schema / properties / steps / items / properties / max_wait_seconds
      Added value: +{
      +  "description": "send_sms with optimal_user_time, required: the longest this text may wait for that hour",
      +  "maximum": 86400,
      +  "minimum": 60,
      +  "type": "integer"
      +}
    • addedInput schema / properties / steps / items / properties / send_time
      Added value: +{
      +  "description": "send_sms: `optimal_user_time` waits for the hour this person usually replies or clicks, inside quiet hours. Default: right_away. Refused for one-time codes and order or shipping texts.",
      +  "enum": [
      +    "right_away",
      +    "optimal_user_time"
      +  ],
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / category
      Added value: +{
      +  "description": "What it sends: marketing, alerts (transactional) or codes (otp). With no `from`, TextKit picks a number approved for this. Falls back to a built-in topic.",
      +  "enum": [
      +    "marketing",
      +    "transactional",
      +    "otp"
      +  ],
      +  "nullable": true,
      +  "type": "string"
      +}
    • changedInput schema / properties / from / description
      Previous value: -"One of your numbers. A sandbox number makes it a sandbox flow."New value: +"One of your numbers, to pin the flow to it. Leave it out and TextKit picks a number approved for `category`. A sandbox number makes it a sandbox flow."
  3. Changed23 schema fields changed
    • addedInput schema / properties / name / description
      Added value: +"Automation name"
    • addedInput schema / properties / step / properties / event / description
      Added value: +"wait_for_event: the event to wait for"
    • addedInput schema / properties / step / properties / on_met / description
      Added value: +"condition: where to go when the check passes: continue, end, or goto:<step id>"
    • addedInput schema / properties / step / properties / on_not_met / description
      Added value: +"condition: where to go when the check fails: continue, end, or goto:<step id>"
    • addedInput schema / properties / step / properties / on_received / description
      Added value: +"wait_for_event: where to go when the event arrives: continue, end, or goto:<step id>"
    • addedInput schema / properties / step / properties / on_timeout / description
      Added value: +"wait_for_event: where to go when time runs out: continue, end, or goto:<step id>"
    • addedInput schema / properties / step / properties / seconds / description
      Added value: +"wait: how long, from 60 seconds to 30 days"
    • addedInput schema / properties / step / properties / timeout_seconds / description
      Added value: +"wait_for_event: how long to wait, from 60 seconds to 30 days"
    • addedInput schema / properties / step / properties / type / description
      Added value: +"What the step does"
    • addedInput schema / properties / steps / items / properties / event / description
      Added value: +"wait_for_event: the event to wait for"
    • addedInput schema / properties / steps / items / properties / on_met / description
      Added value: +"condition: where to go when the check passes: continue, end, or goto:<step id>"
    • addedInput schema / properties / steps / items / properties / on_not_met / description
      Added value: +"condition: where to go when the check fails: continue, end, or goto:<step id>"
    • addedInput schema / properties / steps / items / properties / on_received / description
      Added value: +"wait_for_event: where to go when the event arrives: continue, end, or goto:<step id>"
    • addedInput schema / properties / steps / items / properties / on_timeout / description
      Added value: +"wait_for_event: where to go when time runs out: continue, end, or goto:<step id>"
    • addedInput schema / properties / steps / items / properties / seconds / description
      Added value: +"wait: how long, from 60 seconds to 30 days"
    • addedInput schema / properties / steps / items / properties / timeout_seconds / description
      Added value: +"wait_for_event: how long to wait, from 60 seconds to 30 days"
    • addedInput schema / properties / steps / items / properties / type / description
      Added value: +"What the step does"
    • addedInput schema / properties / trigger / description
      Added value: +"What starts a run: an event, with optional filters"
    • addedInput schema / properties / trigger / properties / event / description
      Added value: +"The tracked event that starts a run"
    • addedInput schema / properties / trigger / properties / filters / description
      Added value: +"Up to 5 checks on the event's properties. All must hold"
    • addedInput schema / properties / trigger / properties / filters / items / properties / op / description
      Added value: +"eq, neq, contains, gt, lt, exists or not_exists"
    • addedInput schema / properties / trigger / properties / filters / items / properties / property / description
      Added value: +"The event property to check"
    • addedInput schema / properties / trigger / properties / filters / items / properties / value / description
      Added value: +"The value to compare with. Not used by exists or not_exists"
  4. Changed3 schema fields changed
    • addedInput schema / properties / if_updated_at
      Added value: +{
      +  "description": "The automation's `updated_at` as you read it. If it changed since (another edit), nothing is saved and the answer is 409: read it again and redo the edit on the latest.",
      +  "format": "date-time",
      +  "type": "string"
      +}
    • addedInput schema / properties / step
      Added value: +{
      +  "description": "One of: send_sms {body, from?}; wait {seconds}; wait_for_event {event, timeout_seconds, on_received, on_timeout}; condition {check, on_met, on_not_met}; end. Branches are \"continue\", \"end\", or \"goto:<id of a later step>\".",
      +  "properties": {
      +    "body": {
      +      "description": "send_sms. Merge fields: event properties by name, {{first_name}}, {{name}}, {{phone}}, {{field:<custom>}}.",
      +      "maxLength": 1600,
      +      "type": "string"
      +    },
      +    "check": {
      +      "description": "{kind: event_received, event} | {kind: property, property, op, value?} | {kind: contact_field, field, op, value?}. op: eq, neq, contains, gt, lt, exists, not_exists.",
      +      "type": "object"
      +    },
      +    "event": {
      +      "type": "string"
      +    },
      +    "from": {
      +      "description": "send_sms: overrides the flow sender.",
      +      "type": "string"
      +    },
      +    "id": {
      +      "description": "Stable handle for goto branches; assigned when omitted.",
      +      "type": "string"
      +    },
      +    "on_met": {
      +      "type": "string"
      +    },
      +    "on_not_met": {
      +      "type": "string"
      +    },
      +    "on_received": {
      +      "type": "string"
      +    },
      +    "on_timeout": {
      +      "type": "string"
      +    },
      +    "seconds": {
      +      "maximum": 2592000,
      +      "minimum": 60,
      +      "type": "integer"
      +    },
      +    "timeout_seconds": {
      +      "maximum": 2592000,
      +      "minimum": 60,
      +      "type": "integer"
      +    },
      +    "type": {
      +      "enum": [
      +        "send_sms",
      +        "wait",
      +        "wait_for_event",
      +        "condition",
      +        "end"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "type"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / steps / description
      Added value: +"Replaces every step."
  5. Changed1 schema field changed
    • addedInput schema / properties / trigger / properties / cooldown_seconds
      Added value: +{
      +  "description": "Optional. After a run starts for a person, they do not start another for this long (for events that repeat, like a paywall view).",
      +  "maximum": 7776000,
      +  "minimum": 60,
      +  "type": "integer"
      +}
  6. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, so the description is not required to establish danger, yet it adds real content: `steps` destroys all existing steps while `step` is a targeted replacement, and concurrent edits answer 409 rather than silently overwriting. It does not spell out that replaced steps are unrecoverable or what other validation failures look like, so it falls just short of fully carrying the burden.

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?

Three sentences, front-loaded with the editable surface, then the highest-risk ambiguity (steps vs step), then the concurrency flag. No filler and nothing repeated from the schema or annotations.

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

Completeness4/5

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

For a 9-parameter tool with deeply nested step/trigger objects, no output schema and destructive semantics, the description covers the two things most likely to cause a bad call: whole-flow replacement and stale-write 409s. It leaves implicit that omitted top-level fields are unchanged and says nothing about the response, which is acceptable given no output schema but is a small gap.

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 genuinely adds meaning the schema lacks: the top-level `step` parameter has no replacement-scope sentence in the schema, and the description supplies it, along with why `if_updated_at` exists (optimistic concurrency, 409 on stale read). That is a real increment over the structured fields.

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 concrete verb (Edit) and resource (automation) and enumerates exactly what is editable: name, sender/category, trigger (incl. cooldown_seconds) and steps. The update/create/delete/get distinction is unambiguous from the sibling names, and the field enumeration confirms the tool is a partial in-place editor.

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?

Explicitly routes between the two overlapping edit paths: `steps` replaces every step, `step` replaces just the one with its id, which is the main choice an agent must make here. It also gives a clear condition for supplying `if_updated_at` (when you read updated_at and want conflict protection). It stops short of saying when to prefer updating over delete+create_automation or when to leave fields untouched.

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.