Skip to main content
Glama

renew_rule

Destructive

Request renewal of an existing reply rule for another approved period. Returns a preview and request ID; a human must approve at the PC before the rule's expiry is extended.

Instructions

Ask for a reply rule to be renewed for another period, counted from the moment of the approval. 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. A rule lasts a fixed number of days (expiry_days in list_rules); renewing is approving it again, so it needs the user. The preview shows the whole rule and the length of the new period. The request can be approved only by the user at the PC, with Windows Hello / Touch ID / PIN (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, expires_at, state}. A paused rule stays paused: renewing is not resuming.

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": "renew_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.6/5.0
Behavior5/5

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

Beyond the annotations, the description discloses critical behavior: the first call executes nothing, returns approval_required with a preview, requires human approval at the PC, expires after a default 15 minutes, deduplicates identical pending requests, rate-limits at 20 requests/hour per tool, and writes every phase to the audit log. It also explains that the approved arguments from the first call are executed rather than arguments passed on the second call, and that an auto rule is a standing permission to send mail.

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?

The description is front-loaded with purpose and structured around the two-phase workflow, which suits the tool's complexity. It is somewhat repetitive about approval being only at the PC and never via Telegram or the agent, but the length is largely justified by the safety-critical behavior being described.

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-approved mutation with no output schema, the description covers the full lifecycle: preview, approval, execution, expiry, deduplication, rate limiting, audit logging, paused-rule behavior, and return shape. An agent has enough information to call it correctly and safely.

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 schema already documents both parameters well. The description still adds meaningful semantics beyond the schema, especially that the second call executes the previously approved arguments rather than the ones passed the second time, and it reinforces that rule_id must come exactly from list_rules.

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 description uses a specific verb and resource: 'Ask for a reply rule to be renewed for another period, counted from the moment of the approval.' It also distinguishes renewal from resuming by stating 'A paused rule stays paused: renewing is not resuming.' This lets an agent separate it from pause_rule/resume_rule without opening 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?

It gives clear procedural guidance for the two-phase approval workflow, including when to omit request_id and when to call again with it. It also provides an explicit exclusion: renewing does not resume a paused rule. However, it does not explicitly route the agent to update_rule or create_rule for adjacent cases, so it falls short of full when-to-use/alternative guidance.

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