Skip to main content
Glama

ews_search_messages

Search emails via Exchange Web Services across inbox, sent, drafts, deleted, or junk folders. Specify folder, limit, and offset to retrieve matching messages for Microsoft accounts.

Instructions

Search emails via Exchange Web Services. Preferred for Microsoft accounts. Supports inbox, sent, drafts, deleted, junk folders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum messages to return (1..50, default 10)
folderNoFolder name (inbox, sent, drafts, deleted, junk)
offsetNoOffset for pagination (default 0)
account_idNoAccount identifier (defaults to `"default"`)default

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesTool-specific data payload
metaYesExecution metadata (timestamp, duration)
summaryYesHuman-readable summary of the operation outcome

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.12

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral disclosure. It conveys a read-style search operation and lists supported folders, but it does not mention whether messages are marked read, permission requirements, pagination behavior, or search syntax. This is adequate but has clear gaps.

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?

Two sentences deliver the protocol, preferred account type, and folder scope with no filler. The key action and context are front-loaded before the supporting folder list.

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

Completeness2/5

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

The description and schema surprisingly expose no search query or criteria parameter, yet the tool is named 'search_messages'. An agent has no way to know what text/filters to provide or how the search is performed, which is a critical gap for invoking it correctly. The output schema helps with return shape but not with the missing search input.

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 100%, so the schema already documents all four parameters (limit, folder, offset, account_id). The description adds only the folder enumeration, which mostly duplicates the folder parameter's allowed values. No additional parameter-level meaning is needed.

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 states a specific action ('Search emails') over a named protocol ('Exchange Web Services') and delimits the resource scope to well-known mail folders. This distinguishes it from IMAP-based search siblings like imap_search_messages and from ews_get_message, which focuses on retrieving a specific message.

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?

'Preferred for Microsoft accounts' provides a clear context for when this EWS tool should be selected, especially alongside IMAP and Graph siblings. It does not name an explicit alternative or exclusion condition, so it stops short of a 5.

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