Skip to main content
Glama

m365_mail_search

Read-onlyIdempotent

Search all mailbox folders with KQL query text to find matching emails; returns message IDs and summaries, newest first, without full bodies.

Instructions

Find emails across mailbox folders using non-empty KQL search text. Returns IDs and summaries, not full bodies, newest first within the returned set. Use m365_mail_list to restrict a search to one folder, or m365_mail_read for message content. top caps total results across internal pages.

Input Schema

NameRequiredDescriptionDefault
topNoMaximum total matches to return, not page size
queryYesNon-empty KQL search text, e.g. from:alex@example.com subject:invoice

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.2.1
    • changedInput schema / properties / query / description
      Previous value: -"Search query (supports KQL)"New value: +"Non-empty KQL search text, e.g. from:alex@example.com subject:invoice"
    • changedInput schema / properties / top / description
      Previous value: -"Max results"New value: +"Maximum total matches to return, not page size"
  2. Changed3 schema fields changedv1.2.0
    • addedInput schema / properties / top / maximum
      Added value: +500
    • addedInput schema / properties / top / minimum
      Added value: +1
    • changedInput schema / properties / top / type
      Previous value: -"number"New value: +"integer"
  3. First observedv1.0.7

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds real context beyond that: results are IDs and summaries rather than bodies, ordering is newest-first, and `top` caps total results across internal pages. It stops short of noting auth requirements or rate limits, so not a 5.

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?

Three short sentences, front-loaded with what the tool does, followed by return shape and sibling routing. Every sentence carries distinct information with no padding.

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?

For a two-parameter read-only search with rich annotations, the description covers purpose, return format, ordering, result capping, and alternatives. No output schema exists, yet the description already explains what comes back, so nothing an agent needs is missing.

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% and the schema already documents both `query` (with a KQL example) and `top` (default 20, max 500, explicitly 'not page size'). The description's line about `top` capping totals across internal pages adds a modest amount of pagination clarity but largely restates the schema, so the baseline 3 applies.

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?

States a specific verb and resource ('Find emails across mailbox folders') plus the input constraint (non-empty KQL search text). An agent can immediately distinguish it from m365_mail_list and m365_mail_read without opening either schema.

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

Usage Guidelines5/5

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

Explicitly routes to alternatives: m365_mail_list when the search must be scoped to one folder, and m365_mail_read when full message content is needed rather than IDs and summaries. Both the when-to-use-this and when-to-use-something-else conditions are present.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.