Skip to main content
Glama
hanhandly

Graph Mail MCP

by hanhandly

mail_search_messages

Search Microsoft 365 mailbox messages by subject, keyword, sender, recipient, or date range using safe Graph queries and filters.

Instructions

Search messages safely. Prefer subject for a known title; query is full-text and may match message bodies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoauto selects safe KQL search for text and safe OData filter for structured-only criteria.auto
queryNoQuoted full-text phrase that may match subject, body, or indexed message content. Use subject instead when the subject is known.
cursorNoOpaque signed cursor returned by a previous call.
sentUtcNoInclusive UTC sent-time bounds.
subjectNoOne or more subject phrases. Prefer this over query when locating a known email title.
bodyModeNoMessage content to return: none omits body and preview, preview returns bodyPreview, and text/html returns body in the requested format.preview
pageSizeNoMicrosoft Graph page size.
folderIdsNoOptional Graph folder IDs that bound the search.
maxResultsNoMaximum messages returned across fetched pages.
receivedUtcNoInclusive UTC received-time bounds.
mailboxScopeNo
participantsNoSender or recipient email-address filters.
conversationIdNoMailbox-local conversation ID, normally used internally for thread reconstruction.
hasAttachmentsNoFilter by Graph hasAttachments state.
Behavior3/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It mentions 'safely' and explains the difference between query and subject, and it hints at mode selection (safe KQL vs OData) but does not disclose details about rate limits, authentication needs, or potential side effects. It doesn't describe what happens on errors or how results are paginated. This is a moderate gap, so a 3 is appropriate.

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

Conciseness4/5

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

The description is very concise with two sentences, front-loading the core purpose ('Search messages safely') and then immediately providing practical guidance on parameter choice. There is no wasted wording, and it efficiently covers the most important usage hint. It earns a 4 for clarity and minimalism, though it could be slightly more structured with explicit sections.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (14 parameters, no output schema, no annotations), the description could be more comprehensive. However, the schema itself is rich with descriptions, and the description covers the key decision point (subject vs query). It does not explain return format or error behavior, but since the schema is detailed, the description is adequate for an agent to call it correctly. A 4 is fitting.

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 high at 93%, so the baseline is 3. The description adds some value by clarifying that subject should be preferred over query for known titles, which is a semantic nuance beyond the schema. It does not detail the exact behavior of mode, cursor, or other parameters, but the schema descriptions are already comprehensive. Thus, a 3 is justified.

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 clearly states the tool's purpose: 'Search messages safely.' It specifies the verb 'search' and the resource 'messages', and it distinguishes between subject and query usage, differentiating it from sibling tools like mail_get_message or mail_list_folders. The emphasis on safety and the guidance on when to use subject vs query make the tool's function unambiguous.

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 provides clear usage context: it says to prefer subject for a known title and warns that query is full-text and may match message bodies. This helps an agent choose between parameters. However, it does not explicitly mention alternatives among siblings (e.g., when to use mail_search_messages vs mail_get_message), though the distinction is implied. There is no explicit 'use this when' or 'avoid this if' statement, but the guidance is strong enough for a 4.

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/hanhandly/graph-mail-mcp'

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