Skip to main content
Glama

create_rule

Create an Outlook inbox rule to automate email handling by matching sender, subject, body, or attachments and applying actions such as moving to a folder, marking as read, or deleting.

Instructions

Create an inbox mail rule.

At least one condition AND one action are required. Conditions within a rule are AND-ed by Outlook. Pass multiple values in a list (e.g. sender_contains=["example.com", "monitor.io"]) for OR within that condition.

Common condition args: sender_contains: Substrings to match against the sender display name or address (e.g. ["example.com"]). subject_contains: Substrings to match against the subject. body_contains: Substrings to match against the message body. body_or_subject_contains: Match either subject or body. from_addresses: Exact email addresses to match (e.g. ["noreply@example.com"]). has_attachments: True/False to require/exclude attachments.

Common action args: move_to_folder: Destination folder id (use list_folders or create_folder to get one). mark_as_read: Mark matching messages as read. delete: Move matching messages to Deleted Items. stop_processing_rules: If True, no further rules run after this one matches. Recommended for routing-to-folder rules.

Other args: sequence: Optional rule order (lower runs first). is_enabled: Whether the rule is active. Default True. mailbox: Optional mailbox for shared mailboxes. include_raw: Include the raw Graph payload.

Returns: The trimmed new rule.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deleteNo
mailboxNo
sequenceNo
is_enabledNo
include_rawNo
display_nameYes
mark_as_readNo
body_containsNo
from_addressesNo
move_to_folderNo
has_attachmentsNo
sender_containsNo
subject_containsNo
stop_processing_rulesNo
body_or_subject_containsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well. It explains condition semantics, action effects (including that delete moves to Deleted Items), rule ordering via sequence, stop_processing_rules behavior, and the default for is_enabled.

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 long but well-structured with clear sections for conditions, actions, other args, and return value. Every sentence adds useful information, and the most critical constraint (condition AND action required) is front-loaded.

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 complex tool with 15 parameters, no annotations, and no output schema, the description is remarkably complete. It covers valid rule construction, parameter semantics, behavioral effects, ordering, and the return value, leaving little for an agent to infer or guess.

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

Parameters5/5

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

Despite 0% schema description coverage and 15 parameters, the description explains nearly all parameters with practical examples and meanings. It even covers how to obtain a folder id via list_folders/create_folder. Only display_name is left implicit, but that is self-explanatory.

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 opens with a specific verb and resource ('Create an inbox mail rule') and is clearly distinct from sibling tools like update_rule, list_rules, and delete_rule. The purpose is unambiguous and immediately actionable.

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 provides essential usage constraints: at least one condition and one action are required, conditions are AND-ed, and multiple values produce OR behavior. It does not explicitly contrast with alternatives, but the create-oriented semantics and sibling set make the use case clear.

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