Skip to main content
Glama

create-mail-rule

Destructive

Create email rules in Outlook that automatically perform actions like moving, forwarding, or deleting messages based on conditions such as sender or subject.

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
Behavior4/5

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

The description explains that the created rule will cause Outlook to perform actions on incoming messages, which implies a destructive/mutating effect. The annotations already set destructiveHint: true, and the description adds context by listing possible actions (e.g., delete, move). It does not contradict annotations and provides adequate behavioral insight beyond them.

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?

The description is relatively concise, front-loads the purpose, and includes a useful tip and example. Every sentence contributes meaning, though the tip and first sentence are slightly redundant. It is well-structured for an agent to quickly grasp the tool's purpose and usage.

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

Completeness3/5

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

Given the complexity of the tool (nested objects, many parameters, no output schema), the description provides a high-level overview and example but does not explicitly mention the return value (the created rule object). It covers the 'how' well but misses the 'what to expect in response', leaving a gap in completeness.

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?

Schema description coverage is 75%, so baseline is 3. The description adds value by providing a concrete example body and summarizing the key action types (moveToFolder, delete, etc.), which helps users structure the 'body' parameter. This goes beyond what the schema alone offers, justifying a score of 4.

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 clearly states it creates a message rule with conditions and actions, and differentiates from other create tools by specifying it's for a mail folder and providing an example. It uses specific verbs and resource references, and implicitly distinguishes from siblings like create-mail-folder or update-mail-rule.

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?

The description includes a tip about using the Inbox folder ID for inbox rules, which provides some contextual guidance. However, it does not explicitly state when to use this tool versus alternatives like update-mail-rule or delete-mail-rule, or provide exclusions. The usage context is implied but not fully detailed.

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