Skip to main content
Glama

Update Rule

update_rule
DestructiveIdempotent

Update an existing automation rule by id. Accepts the full rule definition (same shape as create_rule): read it with get_rule, change what you need and send the whole definition back — an omitted field takes its default (enabled=true, executionMode=propose). The preview lists each field that changes, before and after, and refuses unacknowledged conflicts; the commit is refused if the rule was edited since the preview. Requires Write + automation.execute; company rules need the Admin role and an operator (unpinned) credential. From the in-app assistant a rule cannot be switched to, or turned on in, Autopilot.

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": {
      "ruleId": "<ruleId>",
      "rule": "<rule>"
    },
    "name": "update_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
ruleYesThe updated rule definition — same shape as create_rule.
ruleIdYesRule id to update (GUID).
previewNoStep 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. Nothing changes until the commit call.
idempotencyKeyNoCaller-generated idempotency key; required with previewReceipt to commit.
previewReceiptNoStep 2 of the required two-step write: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit; calls without it are refused.

Output Schema

NameRequiredDescriptionDefault
okNo
ruleNo
effectsNo
previewNo
warningsNo
expiresAtNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
previousVersionNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already flag destructive=true, idempotent=true and readOnly=false, and the description goes well beyond them: default-fill semantics for omitted fields, conflict refusal, staleness refusal if the rule changed since preview, required permissions/role/credential type, and the Autopilot restriction in the in-app assistant. The only real gap is it doesn't say what the preview or commit payloads look like, though the output schema covers returns.

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 verb and resource, then ordered from payload contract to side effects to preconditions to environment caveat. Every sentence carries information an agent needs; nothing restates the title or the schema verbatim.

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 destructive, nested-payload mutation with a required two-phase write, the description covers defaults, conflict handling, concurrency staleness, permissions and a UI-specific limitation. Return values are handled by the output schema, so nothing an agent needs in order 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 baseline is 3; the description adds genuine meaning by stating that omitted fields fall back to defaults (enabled=true, executionMode=propose), which is not expressed in the schema and materially changes how an agent should build the payload. It also ties conflictsAcknowledged, preview, previewReceipt and idempotencyKey into one coherent flow rather than leaving them as isolated 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 specific verb and resource ('Update an existing automation rule by id') and immediately clarifies the payload contract by pointing at the sibling create_rule's shape. An agent can distinguish it from create_rule, get_rule and draft_rule without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit workflow: read with get_rule, change what you need, send the whole definition back. It also states the mandatory two-step write (preview then commit with receipt + idempotencyKey), which is the key decision an agent must get right before calling.

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.

Resources