Skip to main content
Glama

Search

m365_search
Read-onlyIdempotent

Search emails, events, contacts, and OneDrive files by free text across Microsoft 365 when you don't know where items are. Query one or several resource types at once and page results newest first.

Instructions

Find emails, events, contacts or OneDrive files by free text when you do not know where they are. Search one type or several at once. Do not use it to browse a folder (m365_list) or open a known ID (m365_get). Returns matching items labelled by resource, newest first, plus next_cursor.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of items to return.
queryYesWords to search for. Plain text; the server handles quoting.
cursorNonext_cursor from the previous page; keep all other arguments the same.
event_endNoEvent search window end (default: 365 days ahead).
resourcesNoWhich item types to search. Default: all four.
account_idNoAccount ID or email address. Omit when only one account is signed in.
event_startNoEvent search window start (default: 90 days ago).
email_folder_idNoMail folder ID, or one of the aliases inbox, sent, drafts, deleted, junk, archive.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
queryYes
summaryYesOne-line human summary. The tool's text content is this result serialized as JSON (summary included), so a client that ignores structuredContent still sees every field.
has_moreYes
next_cursorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, openWorldHint=true, and destructiveHint=false, so the safety profile is covered. The description adds return ordering ('newest first') and pagination info ('next_cursor'), which are useful behavioral details beyond the annotations. It does not mention rate limits or auth requirements, 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 tightly written sentences, front-loaded with purpose and followed immediately by routing exclusions and return behavior. Every sentence carries distinct, useful information.

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?

Given the rich annotations, 100% schema description coverage, and an output schema, the description covers everything an agent needs to select and invoke the tool correctly: purpose, alternatives, and the return shape including pagination. No critical gaps remain for the agent's decision.

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 documents all eight parameters with descriptions, defaults, and constraints. The description only implicitly references query and resources ('by free text', 'one type or several at once'), adding little beyond what the schema already provides, 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 ('Find') and enumerates the resource types (emails, events, contacts, OneDrive files), with the key qualifier 'by free text'. It explicitly distinguishes itself from siblings m365_list and m365_get, so an agent can route correctly without opening the 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?

Provides an explicit when-to-use condition ('when you do not know where they are') and two when-not-to-use conditions with named alternatives: 'Do not use it to browse a folder (m365_list) or open a known ID (m365_get).' This is about as clear as usage guidance gets.

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