Skip to main content
Glama

imap_search_and_move

Search IMAP messages by sender, subject, date, or full text and move up to 500 matches to another mailbox in a single operation.

Instructions

Search messages and move matches to a mailbox in one operation (up to 500)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoFilter by To header
fromNoFilter by From header
limitNoMaximum messages to move (1..500, default 500)
queryNoFull-text search query
mailboxYesSource mailbox to search (e.g., `INBOX`)
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
destination_mailboxYesDestination mailbox name

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?

No annotations are provided, so the description must convey behavioral details. It discloses the operation (search and move), the limit of 500 messages per call, and that it returns up to 500 messages. It does not mention whether moved messages are flagged as read or if the operation is reversible, but the provided details are reasonable for the tool's behavior.

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?

The description is very concise, just two sentences in the main description. The schema description expands with details but the tool's description is front-loaded with the primary purpose and key limitation. Every sentence is valuable.

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?

Given the tool's complexity (12 parameters, output schema present, and schema covering all parameters), the description is sufficient. It does not explain the output schema contents, but that is likely documented in the output schema itself. It adequately explains the combined operation and the limit, which is the most critical constraint.

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 coverage is 100%, so parameters are fully documented in the schema. The description adds context by mentioning the limit (500) and the single call nature, but does not add further meaning beyond the schema. Therefore baseline 3 is appropriate.

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 clearly states what the tool does: 'Search messages and move matches to a mailbox in one operation'. The verb and resource are specific, and the schema description adds context about combining search and move. It is distinguishable from siblings like imap_search_messages and imap_bulk_move, though it doesn't explicitly name the alternatives.

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?

It implies usage context by stating it combines search + bulk move to avoid round-trip overhead, which suggests it is used when needing to move search results in bulk. However, it does not explicitly state when to prefer this over separate imap_search_messages + imap_bulk_move calls, so guidance is clear but not comprehensive.

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