Skip to main content
Glama

create-mail-rule

Destructive

Automate email management by creating Outlook rules that move, forward, delete, or categorize messages based on conditions like sender, subject, or attachments.

Instructions

Create a messageRule object by specifying a set of conditions and actions. Outlook carries out those actions if an incoming message in the user's Inbox meets the specified conditions.

💡 TIP: Creates a message rule for a mail folder. Use the Inbox folder ID (get it from list-mail-folders) for inbox rules. Body: { displayName: 'Rule name', sequence: 1, isEnabled: true, conditions: { fromAddresses: [{ emailAddress: { address: 'user@example.com' } }] }, actions: { moveToFolder: 'folder-id' } }. Actions: moveToFolder, copyToFolder, forwardTo, forwardAsAttachmentTo, delete, markAsRead, markImportance, stopProcessingRules.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
mailFolderIdYesPath parameter: mailFolderId
includeHeadersNoInclude response headers (including ETag) in the response metadata
excludeResponseNoExclude the full response body and only return success or failure indication
Behavior3/5

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

The description explains that Outlook carries out actions when conditions are met, adding context beyond annotations. However, it doesn't disclose side effects like rule evaluation order, conflict resolution, or immediate activation. Annotations already indicate destructiveHint: true.

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 concise, well-structured, and front-loaded with the purpose. It uses a tip and bullet list for actions without unnecessary verbiage. Every sentence adds value.

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 complex tool with nested objects, the description covers the key concept, provides a sample, and lists actions. It lacks explicit mention of the return value, but the schema implies the created rule is returned. Given the complexity, it is reasonably complete.

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?

With schema coverage at 75%, the description adds a sample body structure and lists available actions (e.g., moveToFolder, forwardTo), which aids understanding. The example clarifies how to structure conditions and actions beyond the raw 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 clearly states the verb 'Create' and the resource 'messageRule'. It explains the purpose: automating actions on incoming mail based on conditions. While it doesn't explicitly differentiate from siblings like update-mail-rule, the action is unambiguous.

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 tip provides a usage guideline: 'Use the Inbox folder ID (get it from list-mail-folders) for inbox rules.' This gives practical context on where to apply the rule. However, it doesn't contrast with alternative tools or specify when not to use it.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Softeria/ms-365-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server