Skip to main content
Glama

Delete Rule

delete_rule
DestructiveIdempotent

Delete an automation rule by id so it stops firing. Its run history is kept. A deleted Spark default rule is not recreated; turning it off with update_rule (enabled=false) keeps it available. The preview shows the rule in plain English; the commit is refused if the rule was edited since the preview. Irreversible from the API. Requires Write + automation.execute; company rules need the Admin role and an operator (unpinned) credential.

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>"
    },
    "name": "delete_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
ruleIdYesRule id to delete (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
ruleIdNo
effectsNo
messageNo
previewNo
warningsNo
expiresAtNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
previousVersionNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructive=true, readOnly=false and idempotent=true, but the description adds substantial context beyond them: run history is preserved, default rules are not recreated, the commit is refused if the rule was edited since preview, and the operation is irreversible from the API. It also discloses the required permissions (Write + automation.execute), the Admin role for company rules, and the need for an unpinned operator credential.

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

Conciseness4/5

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

Front-loaded with the core action and effect, then layered with consequences, alternatives, and auth requirements in a compact sequence. A few clauses (the plain-English preview detail) are slightly marginal but still informative; no filler sentences.

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, permission-gated mutation with a two-step write flow, the description covers consequences, reversibility, the alternative tool, and the auth/role requirements. An output schema exists, so return values need not be explained, and nothing an agent needs in order to call this 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 is 3; the description earns an extra point by explaining the preview/commit contract in prose — the preview renders the rule in plain English and the commit fails if the rule changed since then. It doesn't add detail on idempotencyKey beyond the schema, but the two-step semantics are reinforced usefully.

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 ('Delete an automation rule by id') plus the effect ('so it stops firing'), and immediately distinguishes itself from update_rule by contrasting deletion with disabling. An agent can tell this apart from update_rule or create_rule without opening either 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?

Explicitly routes the agent: a deleted Spark default rule is not recreated, so turning it off with update_rule (enabled=false) keeps it available. It also describes the required two-step preview/commit flow and the condition under which the commit is refused, so both when-to-use and when-not are covered.

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