Skip to main content
Glama

Microsoft 365 Search Emails

m365_search_emails
Read-only

Use this when the user wants to find emails in their Microsoft 365 / Outlook mailbox via the cloud — requires a connected M365 account. By default searches sender, subject, AND body (Microsoft Graph's own $search default). Pass scope="metadata" to search only sender/subject (faster, no body scan), or scope="body" to search only the message body. For accounts added to the Mac's Mail.app, use search_emails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax results (default 20, max 50)
queryYesSearch query, e.g. 'budget Q2', 'from:alice@contoso.com', 'subject:invoice'
scopeNo"all" (default — sender+subject+body, today's behavior), "metadata" (sender+subject only), or "body" (body only).
accountNoWhich connected Microsoft 365 account to use: its email (UPN), its id from list_m365_accounts, or its display name when unique. Leave it out to use the default account.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNo
queryNo
emailsNo
accountNoThe email (UPN) of the Microsoft 365 account this call used.
search_scopeNo
search_backendNo
search_coverageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / account
      Added value: +{
      +  "description": "Which connected Microsoft 365 account to use: its email (UPN), its id from list_m365_accounts, or its display name when unique. Leave it out to use the default account.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / account
      Added value: +{
      +  "description": "The email (UPN) of the Microsoft 365 account this call used.",
      +  "type": "string"
      +}
  2. Changed4 schema fields changed
    • addedInput schema / properties / scope
      Added value: +{
      +  "description": "\"all\" (default — sender+subject+body, today's behavior), \"metadata\" (sender+subject only), or \"body\" (body only).",
      +  "enum": [
      +    "metadata",
      +    "body",
      +    "all"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / search_backend
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / search_coverage
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / search_scope
      Added value: +{
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint, destructiveHint=false) and open-world scope. The description adds real value beyond them: the authentication prerequisite, the Graph $search default field coverage, and the performance tradeoff of each scope ('faster, no body scan'). It stops short of describing pagination or result ordering, but the output schema likely covers returns.

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?

Four short sentences, trigger and prerequisite front-loaded, then scope semantics, then the sibling routing. No filler; every sentence changes how an agent would call the tool.

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 read-only search tool with an output schema, full parameter coverage, and clear annotations, the description supplies everything else needed: when to use it, which account model applies, and how scope alters cost.

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?

Schema coverage is 100%, so baseline is 3, but the description adds meaning the enum text alone lacks — the 'faster, no body scan' rationale for metadata scope and the explicit statement that the default matches Graph's own $search behavior. Account and limit semantics are left to the schema.

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 in their Microsoft 365 / Outlook mailbox via the cloud') and immediately distinguishes itself from the near-identical sibling search_emails by scoping to cloud/M365 accounts.

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?

Opens with an explicit trigger ('use this when the user wants to find emails... via the cloud'), states the prerequisite (connected M365 account), and names the alternative tool with the exact condition that selects it ('For accounts added to the Mac's Mail.app, use search_emails').

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources