Skip to main content
Glama
borystam

homepl-email-mcp

by borystam

mail_search_messages

Read-onlyIdempotent

Search an entire mailbox folder's retained message history via IMAP. Combine filters with AND/OR, match headers, dates, or properties, and page results across folders.

Instructions

Search the entire retained history of one folder using server IMAP search. Fields combine with AND; anyOf children combine with OR. headers supports Message-ID, References, In-Reply-To and arbitrary headers (string substring or true for existence). No implicit date cutoff. Search is server-defined and does not OCR or search inside binary attachments. Repeat across folders and all cursors for account-wide coverage. Results exceeding 64 KiB are saved completely to a private JSON file and return a compact summary with completeResultFile.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
cursorNo
folderYes
pageSizeNo
accountIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.1/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, idempotent, non-destructive, openWorld), and the description adds genuinely non-obvious behavior: no implicit date cutoff, server-defined search that does not OCR or search binary attachments, and the 64 KiB large-result handling that spills full output to a private JSON file and returns completeResultFile. That is substantial context beyond annotations.

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?

Purpose is front-loaded and each subsequent sentence adds a distinct fact (boolean semantics, headers, date policy, OCR limits, coverage loop, large-result handling). It is dense and packs a lot into one block, but little 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?

With no output schema, the description responsibly covers return behavior via the 64 KiB/completeResultFile note, plus search semantics and caveats. The main omission is how pagination (cursor/pageSize) works, but overall it is adequate for an agent to call the tool correctly.

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 0%, so the description carries the burden; it does explain the query object semantics (fields AND together, anyOf children OR, headers substring/true-for-existence), but says nothing about cursor, pageSize, folder, or accountId behavior. It compensates well for the query object but leaves the pagination and addressing params undocumented.

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

Purpose5/5

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

The opening sentence names a specific verb and resource with scope: 'Search the entire retained history of one folder using server IMAP search.' That single-folder, full-history scope distinguishes it from sibling mail_list_messages and mail_get_messages without needing their schemas.

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?

It implies operational usage ('Repeat across folders and all cursors for account-wide coverage') but never states when to choose this over mail_list_messages or mail_get_messages. No explicit when-not or alternative routing is given, leaving the agent to infer selection from the verb.

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