Skip to main content
Glama

delete_rule

Destructive

Requests deletion of an existing GigaMail reply rule; a human must approve the request at the PC, and the rule cannot be restored (pause it to stop temporarily).

Instructions

Ask for a reply rule to be deleted. A reply rule tells GigaMail that, for mail from the given senders (or arriving in the given folder), it prepares a reply from the listed documents, in the given style, within a daily cap and a cooldown per sender, until the rule expires. In semi mode it prepares each reply and waits for the user's approval; in auto mode it replies without asking, so an auto rule is a standing permission to send mail. TWO-PHASE, HUMAN-APPROVED: the first call (no request_id) executes nothing — it returns status=approval_required with a preview of exactly what would happen and a request_id. A human approves out of band, only at the PC (GigaMail console or CLI, never Telegram); the second call with that request_id executes the payload that was approved (the approved arguments, not the ones passed the second time). Requests expire (default 15 min); identical pending requests are deduplicated; more than 20 requests/hour per tool are refused (status=rate_limited). Every phase is written to the audit log. The rule's history of handled mails goes with it, and a deleted rule cannot be brought back: to stop a rule for a while use pause_rule instead. The preview shows the whole rule being deleted. The request is approved only by the user at the PC, with a click on the confirmation (never from Telegram or by you). You cannot approve it: show the preview and ask the user to approve it in the GigaMail console, then call again with the request_id. Returns {success, rule_id, state: 'deleted'}.

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

Input Schema

NameRequiredDescriptionDefault
rule_idYesRule id exactly as returned by list_rules (for example 'rule_1a2b3c4d').
request_idNoOmit on the first call. On the first call the tool does NOT execute: it returns status=approval_required, a preview and a request_id. A human must approve that request_id at the PC (GigaMail console or `gigamail approvals approve`, never Telegram). Then call again with the same request_id to execute. The agent cannot approve; repeating the call without approval just returns awaiting_approval.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.8

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds substantial context on top: the two-phase approval flow, out-of-band human approval only at the PC (never Telegram), expiry (default 15 min), deduplication of identical requests, and a 20-requests/hour rate limit returning status=rate_limited. It also discloses that the rule's handled-mail history is destroyed and deletion is irreversible. The main gap is that it re-explains the approval mechanics three times rather than covering anything further, such as what happens to queued replies or the cooldown state.

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 critical facts are front-loaded (what the tool does, then the two-phase flow), which is good structure. However, the human-approval-only-at-the-PC constraint is restated three separate times ("only at the PC ... never Telegram", "approved only by the user at the PC ... never from Telegram or by you", "You cannot approve it"), and the semi/auto explanation of reply rules is background rather than decision-relevant for a delete call.

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, human-gated mutation with no output schema, the description covers everything an agent needs: the required rule_id source, the two-phase protocol, approval channel, expiry, rate limits, audit logging, irreversibility, the alternative tool, and the return shape {success, rule_id, state: 'deleted'}. Nothing material is left to inference.

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 both parameters are already documented, which sets a baseline of 3. The description nonetheless adds a non-obvious semantic: the second call executes the arguments that were approved, not the ones passed the second time — a detail an agent would otherwise get wrong. It does not add format guidance for rule_id beyond the schema's example.

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?

The first sentence states a specific verb and resource ("Ask for a reply rule to be deleted") and the second defines what a reply rule is, including semi vs auto modes. It also names the sibling that serves the adjacent intent ("to stop a rule for a while use pause_rule instead"), so an agent can distinguish it without opening another 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?

Explicit routing guidance is given: use pause_rule to temporarily stop a rule, use this tool only for permanent deletion. It also states the when-not condition (irreversible, history is destroyed) and the precondition that a human at the PC must approve, so an agent knows both the trigger and the blocking constraint.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.