Skip to main content
Glama

list-mail-messages

list-mail-messages
Read-only

Search and filter Outlook emails across all folders, returning subject, sender, date, read status, and body preview. Use KQL queries and OData filters to narrow results.

Instructions

List, search, and filter Outlook email messages in the signed-in user's mailbox across all folders. Returns message metadata (subject, from, receivedDateTime, isRead, hasAttachments) plus a body preview. Use $search for keyword queries, $filter to narrow by sender/read state/date, $top to limit page size, and $select to trim fields.

đź’ˇ 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().
expandNoNavigation properties to inline, e.g. attachments on a message or event. Only navigation properties can be expanded: expanding a non-navigation property such as a message body fails with "Parsing OData Select and Expand failed", and an unsupported value may be ignored rather than reported. Request ordinary fields with $select instead.
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
Behavior5/5

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

Beyond the annotations (readOnlyHint true, destructiveHint false), the description discloses it returns only a body preview, not the full body, and instructs to use $select to limit fields and bodyPreview instead of body. It also documents the critical quoting requirement for $search and links to KQL reference, adding meaningful behavioral context.

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 well-structured with a clear opening, a tip, critical notes, and examples. It is lengthy but every part contributes actionable guidance; front-loading the core purpose and the 'CRITICAL' for $search quoting helps an agent prioritize. Slightly verbose but justified by the complexity.

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?

Given the tool's complexity (12 optional parameters) and lack of an output schema, the description fully covers what is returned (metadata fields listed), the body preview limitation, and how to obtain full content via a sibling tool. It also covers pagination and advanced query requirements, making it complete for correct invocation.

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?

With 100% schema coverage, the schema already explains each parameter, but the description adds substantial value: it details KQL syntax with concrete examples for $search, recommends a default $select, clarifies that $search cannot be combined with $filter (also in schema), and explains pagination via @odata.nextLink. This goes well beyond minimal schema descriptions.

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 lists, searches, and filters Outlook email messages across all folders, and enumerates the returned metadata fields plus a body preview. It distinguishes from siblings by noting that full body retrieval is via get-mail-message and that it operates across all folders, not a specific one.

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?

It explicitly directs users to get-mail-message for the full email body and advises using $select and bodyPreview for listings. It gives extensive guidance on when to use $search vs $filter (they cannot combine) and notes skip is unsupported with $search. It does not explicitly differentiate from list-mail-folder-messages, but the 'across all folders' phrasing implies the distinction.

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/A-Impact-Pavel/ms365-mcp'

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