Skip to main content
Glama

Save an approved folder rule (beta)

add_rule
Destructive

Saves an approved previewed folder rule to the saved rules store; later rule runs move matching mail. Requires the single-use token from the approved preview.

Instructions

Beta: Save the previewed folder rule; only call after explicit approval of its preview.

The rules engine is not fully reliable yet; preview first and check the results.

Use it only with a token from preview_add_rule that the user approved: the token, not an argument, holds the rule. Unless the operator turned it off, the user then confirms the exact rule in the client's form; a declined form retires the token.

Appends one rule to the saved rules store; never replaces, edits, reorders or removes a rule, and moves no mail now: later rule runs (preview_rules then apply_rules, or the optional timer) move the mail it matches. For Proton's own filtering on arrival use preview_sieve_filter. Removing a saved rule is a manual edit of the store; undo_action does not apply.

Returns log_id for the logged rule-saving attempt, with name, folder, rule_sha256, backend, added, attempted, partial and token_consumed. An expired, used or unknown token refuses, and so does a full store: preview again.

Input Schema

NameRequiredDescriptionDefault
tokenYesSingle-use token from the preview the user approved.

Output Schema

NameRequiredDescriptionDefault

No arguments

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 only declare a mutation that is destructive, non-idempotent, and closed-world; the description adds the substantive behavior: append-only, never replaces/edits/reorders/removes, moves no mail now but enables later movement, single-use token consumption, token retirement on a declined client form, and refusal on expired/used/unknown tokens or a full store. That is information an agent cannot infer from the hints.

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 beta warning and the action are front-loaded, and almost every sentence contributes a distinct fact (store semantics, deferred mail movement, alternatives, return fields, failure modes). There is mild redundancy between the opening approval requirement and the later token-from-approved-preview sentence, and the paragraph is dense for a one-parameter tool.

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 non-idempotent, destructive mutation with a single opaque token, the description covers preconditions, side effects, what is explicitly not affected, failure modes, and even the returned log_id fields despite an output schema existing. Nothing an agent needs to decide whether and how to call it 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% and the single token parameter is already documented as single-use from an approved preview, so the baseline is met by the schema. The description still adds real meaning: the token itself carries the rule rather than any argument, it is consumed on use, and it is retired or refused under specific conditions.

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 clause states a specific verb and resource (save the previewed folder rule) and immediately scopes it to an approved preview. It is clearly separable from preview_add_rule (which creates the token), list_rules, and apply_rules, each of which is named in the body.

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?

It gives an explicit precondition (only after explicit approval, token from preview_add_rule), a warning against misuse while the engine is immature, and a named alternative for a different need (set an arrival-time filter via preview_sieve_filter instead). It also states what this tool is not for: editing or removing rules, which is a manual store edit, and undo_action does not apply.

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