Skip to main content
Glama

list-mail-messages

Read-only

List and search Outlook emails across folders with KQL, filters, pagination, and field selection. Returns results sorted by received date.

Instructions

Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance.

đź’ˇ TIP: List read search my Outlook emails across folders. CRITICAL: When searching emails, the $search parameter value MUST be wrapped in double quotes. Format: $search="your search query here". Use KQL (Keyword Query Language) syntax to search specific properties: 'from:', 'subject:', 'body:', 'to:', 'cc:', 'bcc:', 'attachment:', 'hasAttachments:', 'importance:', 'received:', 'sent:'. Examples: $search="from:john@example.com" | $search="subject:meeting AND hasAttachments:true" | $search="body:urgent AND received>=2024-01-01" | $search="from:john AND importance:high". Remember: ALWAYS wrap the entire search expression in double quotes! Reference: https://learn.microsoft.com/en-us/graph/search-query-parameter IMPORTANT: Always use $select to limit returned fields and reduce response size. Recommended default: $select=id,subject,from,toRecipients,receivedDateTime,bodyPreview,isRead,hasAttachments. Use bodyPreview instead of body for listings. To read the full email body, use get-mail-message with the specific message id.

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.
countNoSet true to enable advanced query mode (ConsistencyLevel: eventual). Required for complex $filter on flag/flagStatus or contains().
expandNoExpand related entities
filterNoOData filter expression. Add $count=true for advanced filters (flag/flagStatus, contains()). Cannot combine with $search.
searchNoKQL search query — wrap value in double quotes. Cannot combine with $filter.
selectNoComma-separated fields to return, e.g. id,subject,from,receivedDateTime
orderbyNoSort expression, e.g. receivedDateTime desc
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
includeHiddenMessagesNoInclude Hidden Messages
Behavior4/5

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

Annotations declare readOnlyHint=true and destructiveHint=false, which the description complements with detailed behavioral info: search syntax requirements, pagination via @odata.nextLink, the fetchAllPages parameter's potential for large payloads, and the recommendation to use $select and bodyPreview. This adds significant value beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is unnecessarily long and poorly structured. It starts with an irrelevant statement about open extensions, which is a copy-paste error. The important content is buried in a TIP section, and the inclusion of a full URL adds clutter. The description could be condensed by half without losing essential guidance.

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?

Despite the lack of an output schema, the description covers critical aspects: search syntax, pagination, filtering, selection best practices, and fetchAllPages caveats. It does not explain the default behavior when no parameters are provided (e.g., default page size), but overall it provides sufficient context for an agent to use the tool effectively.

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?

The input schema has 100% description coverage, so the baseline is 3. The description further clarifies parameter behavior, such as 'Cannot combine with $search' for filter and 'wrap value in double quotes' for search. It also explains KQL syntax and provides examples. This exceeds the schema's own descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description begins with an erroneous copy-paste about 'Get an open extension' which is misleading and degrades clarity. The actual purpose is conveyed in the TIP section: 'List read search my Outlook emails across folders.' This indicates the tool lists messages across folders, differentiating it from folder-specific siblings like list-mail-folder-messages. However, the initial error and lack of a clean statement lower the score.

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 provides usage context through parameter constraints (e.g., $search cannot combine with $filter) and recommends starting with small page sizes. However, it does not explicitly contrast this tool with sibling tools like list-mail-folder-messages or get-mail-message, nor does it state when not to use it. The guidance is implicit but not structured for easy decision-making.

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