Skip to main content
Glama

imap_search_all_mailboxes

Search every mailbox of an account in one call (e.g. a whole conversation via thread_message_id); results are newest first and labelled with their mailbox

Instructions

Search every mailbox of an account in one call (e.g. a whole conversation via thread_message_id); results are newest first and labelled with their mailbox

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoFilter by To header
fromNoFilter by From header
limitNoMaximum messages to return, newest first across all mailboxes (1..200, default 50)
queryNoFull-text search query
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
exclude_mailboxesNoSkip these mailboxes and their sub-mailboxes (exact names, e.g. `Junk`)
include_mailboxesNoOnly search these mailboxes and their sub-mailboxes (exact names)
snippet_max_charsNoMaximum snippet length (50..500, requires `include_snippet=true`)
thread_message_idNoFind a conversation by its RFC 5322 Message-ID (angle brackets optional): the message itself and every reply that references it, in any mailbox

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. Addedv0.4.17

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose two behavioral facts: results are returned newest first and are labelled with their originating mailbox. It says nothing about cost/latency of fanning out across all mailboxes, permission requirements, or pagination limits.

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?

A single sentence that front-loads the scope-defining clause ('Search every mailbox of an account in one call') before the example and output notes. Every clause adds information; nothing is wasted.

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?

For a 15-parameter tool with full schema coverage and an output schema, the description covers the essentials: scope, the cross-mailbox conversation use case, and result ordering. It omits the 'at least one criterion required' constraint, though the schema description states 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 all 15 parameters are already documented in the schema, including limit ordering, date formats, and thread_message_id semantics. The description's mention of thread_message_id duplicates schema content rather than adding new parameter meaning, so the baseline 3 applies.

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 with explicit cross-mailbox scope ('Search every mailbox of an account in one call'), which inherently separates it from the single-mailbox imap_search_messages sibling. It stops short of naming that sibling directly, so an agent still has to infer the comparison rather than being routed to it.

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

Usage Guidelines3/5

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

'e.g. a whole conversation via thread_message_id' supplies one concrete scenario, which is genuine usage context. However there is no explicit when-not-to-use guidance and no named alternative (e.g. imap_search_messages for a single folder), leaving the choice between the two search tools to inference.

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