Skip to main content
Glama

create_mail_rule

Create a Paperless mail rule to automate email processing. Define filters and actions to sort, tag, and route incoming mail.

Instructions

Create a Paperless mail rule. Use list_mail_accounts first to choose account. Prefer attachment-only rules for invoices unless the full mail must be archived.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
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
folderYes
accountYes
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.1/5.0
Behavior2/5

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

With no annotations provided, the description carries the full behavioral burden, yet it only hints at the attachment-vs-full-mail tradeoff. It says nothing about what happens once the rule is created (whether it starts fetching mail), permission requirements, or side effects for a 24-parameter mutating tool.

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?

Three tight sentences with the core action front-loaded and no filler. The use-case advice is compact, though it is somewhat narrow relative to the tool's breadth.

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 high-complexity creation tool with 24 parameters, no annotations, no output schema, and 25% schema coverage, the description is far too thin. It omits the behavioral and parameter context an agent needs to invoke it correctly.

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 25%, and the description explains almost none of the 24 parameters beyond gesturing at account and attachment-only behavior. With low coverage the description should compensate, but it leaves most fields (order, action, filters, assign_* mappings) entirely to the sparse schema.

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?

The description opens with a specific verb+resource, 'Create a Paperless mail rule,' which is unambiguous and clearly distinct from get/update/delete_mail_rule siblings. However, it does not explicitly name those siblings or differentiate create from update, so it stops short of full sibling routing.

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 a concrete prerequisite ('Use list_mail_accounts first to choose account') and a situational recommendation ('Prefer attachment-only rules for invoices unless the full mail must be archived'). That is actionable, though it never addresses when to update vs create a rule or any preconditions beyond account selection.

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