Skip to main content
Glama
abconsultdev

IMAP MCP

by abconsultdev

Mails suchen

mail_search
Read-only

Find emails in an IMAP folder by sender, subject, or text; returns UIDs, dates, senders, subjects, and flags of the newest matches, enabling subsequent reading.

Instructions

Durchsucht einen IMAP-Ordner und gibt Kopfdaten (UID, Datum, Absender, Betreff, Flags) der neuesten Treffer zurück. Ohne Filter kommen die neuesten Nachrichten des Ordners. Die UIDs aus dem Ergebnis sind die Eingabe für mail_read.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoTeilstring im Empfänger.
bodyNoTeilstring im Nachrichtentext.
fromNoTeilstring im Absender.
seenNoNur gelesene Mails.
textNoTeilstring in Kopfzeilen ODER Text.
limitNoMaximale Trefferzahl (neueste zuerst).
sinceNoNur Mails ab diesem Datum, z.B. 2026-09-01.
beforeNoNur Mails vor diesem Datum.
unseenNoNur ungelesene Mails.
accountNoE-Mail-Adresse (oder Name) des Postfachs. Weglassen, wenn nur eines eingerichtet ist. Bei mehreren Pflicht - mail_list_accounts zeigt die verfügbaren. Beim Senden immer das Postfach wählen, von dem der Nutzer absenden will, und im Zweifel nachfragen.
flaggedNoNur markierte Mails.
mailboxNoIMAP-Ordner, z.B. "INBOX" oder "INBOX/Projekte".INBOX
subjectNoTeilstring im Betreff.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.3/5.0
Behavior4/5

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

The annotations already mark the tool readOnlyHint=true, and the description adds useful behavioral details: results are the newest messages, only header data is returned, and UIDs are intended as inputs for subsequent mail_read calls. There are no contradictions, and the description adds value beyond the annotations.

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?

Three short sentences, all substantive: operation, default behavior, and downstream usage. No filler or redundant restatement.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only search tool with a fully described schema, the description covers the essential context: what it searches, what it returns, how results are ordered, and how to continue with mail_read. No critical usage information appears missing; account-selection nuance is handled in the schema.

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 input schema already covers 100% of the parameters with individual German descriptions, so the description does not need to explain each parameter. It reinforces the limit/ordering behavior ('neueste Treffer') and the UID relationship, but adds no parameter-level semantics beyond the schema.

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 opens with a specific verb and object: searches an IMAP folder and returns header data (UID, date, sender, subject, flags). It also clarifies the no-filter behavior and connects the output to mail_read, distinguishing it from sibling read/mailbox tools without ambiguity.

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 provides clear context: when no filters are given it returns the newest folder messages, and it states that the returned UIDs feed into mail_read. It does not explicitly list when to prefer other siblings like mail_list_mailboxes or mail_get_raw, so it stops short of a full when-not-to-use guide.

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