Skip to main content
Glama

m365_mail_search

Read-onlyIdempotent

Search emails across all folders using a KQL query, with an option to limit the number of results.

Instructions

Search emails across all folders

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoMax results
queryYesSearch query (supports KQL)
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, covering safety. The description adds the 'all folders' scope, which is a meaningful behavioral trait not conveyed by annotations. However, it does not disclose return format, result ordering, or whether searches cover message bodies vs. metadata, so it only partially enriches beyond annotations.

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

Conciseness5/5

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

The description is a single, front-loaded sentence: 'Search emails across all folders.' It states the core purpose and key differentiator with zero wasted words, earning top marks for conciseness and structure.

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?

While the annotations and schema cover safety and parameters, there is no output schema, and the description does not explain what the search returns (e.g., message summaries, counts, or full content). Given the tool's moderate complexity, this missing return-value information leaves the description minimally adequate but not fully complete.

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%: both 'query' (supports KQL) and 'top' (max results) are described in the schema. The tool description adds no additional parameter context, so it lands at the baseline score of 3, as expected when the schema carries the full burden.

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 'Search emails across all folders' clearly states the verb (search) and resource (emails), with an explicit scope ('across all folders') that distinguishes it from sibling tools like m365_mail_list (which likely lists emails in a specific folder). This is a specific, non-tautological purpose.

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?

The description implies a clear use case: perform a global email search across all folders, versus using m365_mail_list to browse a specific folder. While it does not explicitly name alternatives or provide exclusion criteria, the 'across all folders' phrase gives clear contextual guidance for when to select this tool over folder-scoped siblings.

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/sam2kb/m365-mcp'

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