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. Pass folder to search one folder (a well-known name, or an id, name or path from m365_list_email_folders). For accounts added to the Mac's Mail.app, use search_emails.

Input 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).
folderNoSearch only this folder: a well-known name, or an id, name or path from m365_list_email_folders. Leave it out to search the whole mailbox.
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

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 / folder
      Added value: +{
      +  "description": "Search only this folder: a well-known name, or an id, name or path from m365_list_email_folders. Leave it out to search the whole mailbox.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / emails / items / properties / conversation_id
      Added value: +{
      +  "description": "For m365_move_email (conversation_id).",
      +  "type": "string"
      +}
  2. 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"
      +}
  3. 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"
      +}
  4. First observed

TDQS

A4.7/5.0
Behavior4/5

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

With readOnlyHint/openWorldHint/destructiveHint=false already given, the description adds real context beyond the annotations: cloud-only requirement and the default search field set (sender+subject+body via Graph $search). It also explains performance tradeoffs ('faster, no body scan') for metadata scope, which is genuinely useful behavioral detail. It stops short of describing result shape or pagination, but the output schema covers returns, so this is a near-miss rather than a gap.

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?

Front-loads the usage trigger, then the default behavior, then the parameter-affecting branches, then the sibling alternative. Every sentence carries actionable information (default fields, scope tradeoff, folder source, alternative tool) with no filler.

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?

An output schema exists, annotations declare the safety/open-world profile, and all five parameters are described in the schema with the description reinforcing the two that change behavior (scope, folder). For a read-only search tool, an agent has everything needed to call it correctly.

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 the baseline is 3; the description still adds value by clarifying default vs. explicit scope semantics and the consequence of choosing metadata ('faster, no body scan'), and by explaining that folder can take a well-known name or an id/path from m365_list_email_folders. The account parameter's default behavior is only covered in the schema, so it isn't a full 5.

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 scopes it to a provider, so an agent can immediately distinguish it from search_emails, proton_search_emails, or thunderbird_search_emails. The verb 'find' plus the mailbox target leaves no ambiguity about what the tool does.

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...') and a prerequisite (requires a connected M365 account). It also names the fallback for a different context: 'For accounts added to the Mac's Mail.app, use search_emails.' Both when-to-use and when-to-use-something-else are covered.

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