Skip to main content
Glama
WEYERSK

IMAP MCP

by WEYERSK

search_messages

Search an IMAP folder for messages by sender, subject, text, or date filters, and retrieve headers newest first without marking messages as read.

Instructions

Search a folder and return message headers, newest first.

Dates are YYYY-MM-DD and IMAP compares by day only. 'text' is a server side substring search across the whole message and its behaviour varies by server. include_snippet=True adds the first 200 characters of each body, which means downloading every match, so keep the limit small when using it. raw_criteria takes a raw IMAP search string and overrides the other filters. Reading never marks anything as seen.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNo
limitNo
sinceNo
beforeNo
folderNoINBOX
offsetNo
unseenNo
accountNo
flaggedNo
subjectNo
to_addressNo
from_addressNo
raw_criteriaNo
include_snippetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively explains that reading never marks messages as seen, describes server-dependent behavior for 'text', warns about performance implications of include_snippet, and clarifies date comparison semantics. It does not cover auth or rate limits, but the key behavioral traits are well disclosed.

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?

The description is compact and front-loads the core purpose, then provides targeted details on tricky parameters. Each sentence contributes new information without redundancy. It could be slightly more structured but is efficient overall.

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?

Given 14 parameters and no output schema or annotations, the description is reasonably complete for a search tool. It explains key behaviors like read safety, date handling, and performance costs. However, it omits details like how multiple filters combine (AND/OR), pagination semantics of limit/offset, and the meaning of an empty text search. These gaps prevent a higher score.

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?

The schema has zero description coverage, so the description must compensate. It adds meaning for several parameters: date format and day-only comparison, server-side substring behavior of 'text', the download cost of include_snippet, and raw_criteria overriding other filters. However, many parameters (limit, offset, folder, unseen, flagged, subject, to_address, from_address, account) are left unexplained, though their names are self-descriptive. Partial coverage earns a 3.

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 description clearly states the tool searches a folder and returns message headers, with a specific ordering (newest first). This distinguishes it from siblings like get_message (single message retrieval) and list_folders (folder listing). The verb 'search' and resource 'folder' are explicit.

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?

The description provides practical usage tips, such as keeping the limit small when include_snippet is true, and notes that raw_criteria overrides other filters. However, it does not explicitly compare against alternatives or state when not to use it, though the context is clear enough for an agent to infer appropriate usage.

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