Skip to main content
Glama

ews_search_messages

Read-onlyIdempotent

Search Microsoft Exchange emails via EWS across inbox, sent, drafts, deleted, and junk folders, with pagination and account selection.

Instructions

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

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ews_search_messages"
  }
}

Input 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

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.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety and repeatability profile is fully covered by structured data. The description adds only the folder scope, and says nothing about rate limits, auth/account binding, or whether results are truncated by the default limit. An output schema exists, so return-shape disclosure is not required, but the behavioral surplus over annotations is thin.

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?

Three short sentences, front-loaded with the action and protocol, with no filler. Marginal room to improve by folding the account-routing hint into the opening sentence rather than the middle.

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

Completeness3/5

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

Annotations, a complete schema and an output schema carry most of the burden, and the description covers identity and folder scope. However, a tool named "search" exposes no query criterion in its schema, and the description never clarifies that this is a scoped listing rather than keyword search — a material ambiguity for an agent deciding how to call it.

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 limit, folder, offset and account_id are already documented with defaults and ranges. The description's folder list merely restates the folder parameter's enum-like values and adds no syntax or interaction detail (e.g. how offset pairs with limit). Baseline 3 applies when the schema does the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ("Search emails") and names the transport (Exchange Web Services), which separates it from the IMAP-family siblings at a glance. It falls short of a 5 because it never names the counterpart tool (imap_search_messages) that an agent would otherwise need to disambiguate against.

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" is a genuine routing signal that tells the agent when this tool is the right pick over an IMAP alternative. There is no explicit exclusion or fallback stated, so it stops short of full when/when-not guidance.

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