Skip to main content
Glama

list-mail-rules

Read-only

Lists all message rules for a specified mail folder, showing rule details like conditions, actions, and exceptions.

Instructions

Get all the messageRule objects defined for the user's inbox.

đź’ˇ TIP: Lists all message rules for a mail folder. Use the Inbox folder ID (get it from list-mail-folders) for inbox rules. Each rule has displayName, sequence, isEnabled, conditions (fromAddresses, subjectContains, etc.), actions (moveToFolder, forwardTo, delete, etc.), and exceptions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoPage size (Graph $top). Start small (e.g. 5–15) so responses fit the model context; raise only if needed. Use $select to return fewer fields per item. For more rows, use @odata.nextLink from the response instead of a very large $top.
skipNoItems to skip for pagination. Not supported with $search.
searchNoKQL search query — wrap value in double quotes. Cannot combine with $filter.
filterNoOData filter expression. Add $count=true for advanced filters (flag/flagStatus, contains()). Cannot combine with $search.
countNoSet true to enable advanced query mode (ConsistencyLevel: eventual). Required for complex $filter on flag/flagStatus or contains().
orderbyNoSort expression, e.g. receivedDateTime desc
selectNoComma-separated fields to return, e.g. id,subject,from,receivedDateTime
expandNoExpand related entities
mailFolderIdYesPath parameter: mailFolderId
fetchAllPagesNoFollow @odata.nextLink and merge up to 100 pages into one response. Can return enormous payloads—only when the user explicitly needs a full export. Prefer a small $top first, then paginate or narrow with $filter/$search.
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?

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is clear. The description adds context about the response structure (listing rule properties) and the need for a mailFolderId, but does not disclose further behavioral traits like pagination limits, rate limiting, or any hidden side effects. It adds some value but is not comprehensive.

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 concise, with two short paragraphs. The first sentence directly states the purpose, and the second provides a tip and a bullet-like list of rule properties. It is front-loaded and efficient, though the tip could be integrated more concisely.

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?

Given the lack of an output schema, the description provides a useful overview of response fields (displayName, sequence, isEnabled, conditions, actions, exceptions) and mentions conditions' subfields. It also notes the required mailFolderId. This is sufficiently complete for a list tool, though it does not mention error cases or full pagination behavior.

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 coverage is 100%, so every parameter is already documented. The description adds meaning by explaining the 'mailFolderId' parameter's typical value (Inbox) and summarizing what the response contains, which helps conceptual understanding. However, it does not go into detail on each parameter beyond what the schema provides, keeping it at baseline.

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 'Get all the messageRule objects defined for the user's inbox' with a specific verb and resource. It also provides a tip about using the Inbox folder ID and lists the key properties of a rule (displayName, sequence, isEnabled, conditions, actions, exceptions), making the tool's functionality unambiguous and distinct from sibling tools like create/delete/update mail rules.

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 gives a helpful tip about retrieving the Inbox folder ID from 'list-mail-folders', which is a prerequisite. However, it does not explicitly state when to use this tool versus alternatives (e.g., for specific folders, or when not to use it), nor does it mention any exclusions or cost considerations.

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