Skip to main content
Glama

Create Inbox Rule

create_mail_rule
Destructive

Create inbox rules that move, copy, mark read, set importance, categorize, or delete new mail when conditions match; at least one condition and one action are required, and mail is never forwarded.

Instructions

Create an inbox rule that acts on new incoming mail: move or copy it to a folder, mark it read, set its importance, add categories, or delete it. Needs at least one condition and one action; several conditions must all match. Rules here never forward or redirect mail.

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

Input Schema

NameRequiredDescriptionDefault
nameYesRule name
deleteNoMove matches to Deleted Items
enabledNoCreate the rule turned on (default) or off
mailboxNoEmail address of another mailbox to act on (delegated or shared), e.g. 'someone@example.com'. Omit for your own mailbox; required when this server signs in as an application. Only addresses this server is configured to allow will be accepted.
sequenceNoPosition among the rules; lower runs first (default 1)
importanceNoOnly messages of this importance
mark_as_readNoMark matches as read
body_containsNoText in the body, any of which matches
copy_to_folderNoFolder to copy matches to, named the same ways
from_addressesNoSender email addresses, any of which matches
move_to_folderNoFolder to move matches to: a well-known name (archive, junkemail), display name, or ID
has_attachmentsNotrue: only messages with attachments. false is ignored
mark_importanceNoSet matches' importance
sender_containsNoText in the sender's name or address
sent_only_to_meNotrue: only messages where you are the only recipient. false is ignored
subject_containsNoText in the subject, any of which matches
assign_categoriesNoCategories to add to matches
recipient_containsNoText in the To or CC recipients
stop_processing_rulesNoSkip later rules for a message this rule matched
body_or_subject_containsNoText in the body or subject

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.6.1

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the mutation risk is flagged structurally. The description adds real value beyond that: rules apply only to new incoming mail rather than existing messages, conditions are ANDed, and forwarding is unsupported. It still does not say what happens on name collision, what is returned, or that the delete action sends mail to Deleted Items (that detail lives only in the schema).

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 sentences with zero filler: the first states purpose and effect list, the second states the validity constraint and the capability exclusion. The most important scoping fact (new incoming mail) is front-loaded.

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 20-parameter mutation with no output schema, the description covers the essentials an agent needs: valid construction (condition + action, AND semantics), scope (new mail only), and a hard capability limit. The remaining gaps — return value, ordering behavior beyond the schema's sequence docs, error conditions — are modest given full schema coverage and clear annotations.

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

Parameters3/5

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

Schema description coverage is 100%, so every one of the 20 parameters, including the mailbox delegation caveat and folder naming rules, is already documented. The description groups the action vocabulary (move, copy, mark read, importance, categories, delete) which helps the agent pick the right parameters, but it adds no format or naming detail beyond the schema. Baseline 3 applies.

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?

States a specific verb and resource ('Create an inbox rule') and immediately enumerates the effects it can have: move/copy to folder, mark read, set importance, add categories, delete. It also scopes the tool ('acts on new incoming mail') and rules out a competitor capability ('never forward or redirect mail'), so the agent can distinguish it from the delete/list rule siblings by verb and from forwarding tools by scope.

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?

Gives concrete preconditions — 'Needs at least one condition and one action' and 'several conditions must all match' — which tell the agent how to shape a valid call, plus an exclusion ('never forward or redirect mail') that steers forwarding intents elsewhere. It does not name an alternative sibling (e.g. for forwarding or for listing rules), keeping it just short of a 5.

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