Skip to main content
Glama

imap_search_messages

Search email messages in a mailbox by sender, recipient, subject, date, unread status, or full-text query. Use cursor pagination to page through results.

Instructions

Search messages with cursor pagination

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoFilter by To header
fromNoFilter by From header
limitNoMaximum messages to return (1..50, default 10)
queryNoFull-text search query
cursorNoPagination cursor from previous search result
mailboxYesMailbox to search (e.g., `INBOX`, `Sent`, `Archive`)
subjectNoFilter by Subject header
end_dateNoFilter to messages before this date (YYYY-MM-DD)
last_daysNoFilter to messages from last N days
account_idNoAccount identifier (defaults to `"default"`)default
start_dateNoFilter to messages on or after this date (YYYY-MM-DD)
unread_onlyNoFilter to unread messages only
include_snippetNoInclude subject snippet in results
snippet_max_charsNoMaximum snippet length (50..500, requires `include_snippet=true`)

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

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the burden. It only mentions cursor pagination; it does not disclose read-only semantics, result ordering, default limits, or what the cursor means for follow-up calls.

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?

One short sentence, front-loaded with verb and resource. Concise, though arguably too terse for a multi-criteria search tool.

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?

With 14 parametersiki and cursor pagination, the 5-word description leaves out search semantics, filter combinations, result ordering, and cursor behavior. Output schema may cover return values but not calling context.

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 covers 100% of parameters with descriptions, so baseline 3 applies. The description adds no parameter-level meaning beyond the schema.

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 uses a specific verb and resource ('Search messages') and adds a distinguishing behavioral detail ('cursor pagination'). It does not explicitly differentiate from sibling search tools, but the core purpose is clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives, how filters combine, or how pagination should be driven. The description is purely declarative.

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