Skip to main content
Glama

list-mail-messages

Read-only

Retrieve and search email messages from Microsoft 365 accounts using KQL syntax to filter by sender, subject, body content, attachments, dates, and importance levels.

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: 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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeHiddenMessagesNoInclude Hidden Messages
topNoShow only the first n items
skipNoSkip the first n items
searchNoSearch items by search phrases
filterNoFilter items by property values
countNoInclude count of items
orderbyNoOrder items by property values
selectNoSelect properties to be returned
expandNoExpand related entities
fetchAllPagesNoAutomatically fetch all pages of results
includeHeadersNoInclude response headers (including ETag) in the response metadata
excludeResponseNoExclude the full response body and only return success or failure indication
Behavior2/5

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

Annotations provide readOnlyHint=true and destructiveHint=false, which the description doesn't contradict. However, the description adds confusing behavioral information about open extensions that doesn't match the tool's apparent purpose. The search syntax tip is helpful behavioral context, but it's buried in a description that's fundamentally wrong about the tool's function.

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 poorly structured - it starts with completely irrelevant information about open extensions, then has a lengthy tip about search syntax. While the search syntax information is detailed, it's presented in a confusing context. The description is not front-loaded with the tool's actual purpose.

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

Completeness1/5

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

The description is fundamentally incomplete and misleading. It describes a different tool (getting open extensions) while the tool name suggests listing mail messages. No output schema exists, and the description doesn't explain what the tool actually returns. Given the complete mismatch between name and description, this fails to provide adequate context.

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 description coverage is 100%, so the schema already documents all 12 parameters. The description doesn't add any meaningful parameter semantics beyond what's in the schema - it only mentions the $search parameter in the context of a confusing example about open extensions. Baseline 3 is appropriate when schema does the heavy lifting.

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

Purpose1/5

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

The description is completely misleading - it describes 'Get an open extension' which has nothing to do with the tool name 'list-mail-messages'. The description talks about Microsoft Graph open extensions and permissions tables, while the tool name suggests listing email messages. This is a serious mismatch that would confuse any AI agent.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives. The description mentions searching emails with $search parameter, but doesn't explain when to use list-mail-messages vs list-mail-folder-messages or get-mail-message. The tip about search syntax is useful but doesn't provide usage context relative to sibling tools.

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