Skip to main content
Glama

Search emails

email_search
Read-only

Search emails by from/to/subject/body/text, date range, and flags. Searches ALL folders unless a folder is given. Note: on the ox-api transport, body/text match only the subject and addresses of recent messages (not full message…

Instructions

Search emails by from/to/subject/body/text, date range, and flags. Searches ALL folders unless a folder is given. Note: on the ox-api transport, body/text match only the subject and addresses of recent messages (not full message bodies); use the imap transport for true full-text search.

Input Schema

NameRequiredDescriptionDefault
toNo
bodyNo
fromNo
seenNo
textNoMatch anywhere in headers or body.
limitNo
sinceNoISO date: only messages on/after this date.
beforeNoISO date: only messages before this date.
folderNoFolder to search; omit to search every folder.
serverNoServer/account id to target. Defaults to the configured default server.
flaggedNo
subjectNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.4

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered; the description adds non-obvious behavior beyond that: the default all-folders scope and the transport-specific caveat that body/text do not match full bodies on ox-api. That caveat is exactly the kind of behavioral disclosure structured fields cannot carry.

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 tight sentences, front-loaded with the searchable fields and scope default, with the transport caveat correctly placed last. No filler, though the transport note is dense and could be separated for readability.

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?

For a 12-parameter tool with 42% schema coverage and no output schema, the description covers scope, field groups, and a key transport nuance but says nothing about pagination (limit caps at 200 with no offset), server targeting, or what a result contains. Adequate for a read-only search, but with visible remaining gaps.

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 only 42%, so the description carries some burden, and it partially compensates by grouping parameters into searchable fields, date range, and flags, plus clarifying body/text transport behavior. However, seen, flagged, limit, server, and the from/to/body parameters receive no semantic elaboration, leaving documented gaps.

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?

States a specific verb and resource ("Search emails") and enumerates the matchable fields (from/to/subject/body/text, date range, flags). It distinguishes itself from a plain listing tool by specifying default scope ("Searches ALL folders unless a folder is given"), though it never names siblings like email_list or email_filter_list directly.

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?

Gives clear operative guidance: folder omitted means search everywhere, folder given means scoped, and the ox-api transport limitation with an explicit alternative ("use the imap transport for true full-text search"). It lacks an explicit when-not/alternative comparison against email_list or email_filter_list, 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.