Skip to main content
Glama

update_mail_rule

DestructiveIdempotent

Patch an existing Paperless mail rule by updating only the fields you supply; all other settings remain unchanged.

Instructions

Patch an existing Paperless mail rule. Only supplied fields are changed.

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": {
      "id": "<id>"
    },
    "name": "update_mail_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
nameNo
orderNo
ownerNo
actionNoMail rule action: 1=Delete, 2=Move to specified folder, 3=Mark as read/don't process read mails, 4=Flag/don't process flagged mails, 5=Tag/don't process tagged mails
folderNo
accountNo
enabledNo
filter_toNo
pdf_layoutNoPDF layout for full-mail consumption: 0=System default, 1=Text then HTML, 2=HTML then text, 3=HTML only, 4=Text only
assign_tagsNo
filter_bodyNo
filter_fromNo
maximum_ageNo
filter_subjectNo
attachment_typeNoAttachment type: 1=Only process attachments, 2=Process all files including inline attachments
action_parameterNo
assign_title_fromNoTitle assignment: 1=Use subject as title, 2=Use attachment filename as title, 3=Do not assign title from rule
consumption_scopeNoConsumption scope: 1=Only process attachments, 2=Process full mail as .eml, 3=Process full mail and attachments separately
assign_correspondentNo
assign_document_typeNo
assign_owner_from_ruleNo
assign_correspondent_fromNoCorrespondent assignment: 1=Do not assign, 2=Use mail address, 3=Use sender name or address, 4=Use assign_correspondent
filter_attachment_filename_excludeNo
filter_attachment_filename_includeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.1

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already flag readOnlyHint=false, destructiveHint=true, and idempotentHint=true, so the agent knows this is a mutating but idempotent call. The description adds genuine value by clarifying PATCH semantics: unsupplied fields are left untouched rather than reset, which is exactly the risk an agent needs to know. It adds nothing about permissions or what happens to invalid enum values.

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?

Two short sentences with zero waste, and the operation scope is front-loaded before the PATCH-semantics note. Nothing is repeated from annotations or schema.

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

Completeness2/5

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

For a destructive, 25-parameter mutation with no output schema and 24% schema coverage, two sentences are not enough. An agent would need to know which interdependent fields belong together (e.g., action with action_parameter and folder, or assign_correspondent_from with assign_correspondent) and what a successful patch returns or whether the rule is re-fetched.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 24% across 25 parameters, so the description needs to compensate and does not. The only hint is 'only supplied fields are changed', which tells the agent that most parameters are optional but gives no meaning for envelope fields like action_parameter, folder, filter_from, or assign_tags. The in-schema enum descriptions do some work, but most parameters remain undocumented in both places.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Patch an existing Paperless mail rule.' The word 'existing' plus the create/delete/get mail-rule siblings makes the operation type clear without opening a schema. It stops short of naming a sibling explicitly, so it is not a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Patch an existing ... rule' and 'Only supplied fields are changed' imply this is the partial-update path versus create_mail_rule or delete_mail_rule, which is adequate implied guidance. There is no explicit when-to-use/when-not statement and no mention of prerequisites such as needing the rule id first.

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