Skip to main content
Glama

update_mail_rule

Idempotent

Update specific fields on an existing Paperless-NGX mail rule without changing others. Use it to adjust matching, assignment, or processing behavior in one request.

Instructions

Update fields on ONE mail rule (PATCH — only fields you supply are changed). E.g. switch assign_correspondent_from to 4 to stop creating a correspondent per sender.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
nameNo
orderNoRules run in ascending order
ownerNo
actionNoWhat happens to processed mail: 1=delete, 2=move to action_parameter folder, 3=mark as read (default), 4=flag, 5=tag with action_parameter
folderNoIMAP folder (default INBOX); subfolders use the server's delimiter, e.g. INBOX.Invoices
accountNoMail account ID
enabledNo
filter_toNo
pdf_layoutNoMail-to-PDF layout: 0=system default, 1=text then HTML, 2=HTML then text, 3=HTML only, 4=text only
assign_tagsNo
filter_bodyNo
filter_fromNo
maximum_ageNoOnly mails younger than this many days (default 30)
filter_subjectNo
attachment_typeNo1=attachments only (default), 2=all files including inline
stop_processingNoSkip later rules once this rule queued a document
action_parameterNo
assign_title_fromNo1=mail subject (default), 2=attachment filename, 3=don't assign
consumption_scopeNo1=attachments only (default), 2=whole mail as .eml, 3=.eml plus attachments as separate documents
assign_correspondentNo
assign_document_typeNo
assign_owner_from_ruleNo
assign_correspondent_fromNo1=don't assign (default), 2=sender mail address, 3=sender name (falls back to address), 4=the correspondent in assign_correspondent. ⚠️ 2 and 3 CREATE a new correspondent for every distinct sender string — the usual cause of duplicate correspondents. Prefer 4, or 1 plus matching rules on existing correspondents.
filter_attachment_filename_excludeNoSkip attachments whose whole filename matches
filter_attachment_filename_includeNoOnly attachments whose whole filename matches, e.g. *.pdf

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.2.0

TDQS

A4.6/5.0
Behavior5/5

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

The description adds important behavioral context beyond annotations: PATCH semantics (only supplied fields change, no destructive full-object overwrite), and a warning about assign_correspondent_from values 2/3 creating duplicate correspondents. Annotations already say readOnlyHint=false, idempotentHint=true, destructiveHint=false, so the description adds value without contradicting them.

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?

The description is two sentences, front-loaded with the core behavior (PATCH on ONE rule) and a concrete example. No filler or repetition of schema content. The warning example is dense but earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 26-parameter PATCH tool with no output schema, the description is adequate but leaves the agent to infer parameter meanings from the 50% schema coverage. It does not explain return values or error behavior, but the PATCH semantics and example cover the riskiest choice.

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 50%, and the description does not enumerate or explain most parameters. However, the core parameter semantics (PATCH semantics, assign_correspondent_from values, stop_processing) are partially covered by the schema descriptions. The description adds an important warning example for assign_correspondent_from that goes beyond the schema.

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 states a specific action ('Update fields on ONE mail rule'), the resource (mail rule), and the PATCH semantics (only supplied fields are changed), which clearly distinguishes it from create_mail_rule and delete_mail_rule siblings. It includes a concrete example that adds precision about the subtle assign_correspondent_from behavior.

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?

The description implies usage context: use for updating a single rule, contrasted with one-rule scope ('ONE'). It does not explicitly name siblings create_mail_rule/delete_mail_rule or state when not to use it, but the PATCH semantics and example give clear enough guidance for an agent to select it over list/get/create/delete siblings.

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

Deploy Server

Other Tools