Skip to main content
Glama
nikolausm

IMAP MCP Server

by nikolausm

imap_get_email

Fetch a single email's full content by UID: body (Markdown by default), metadata, and attachment list. Use after searching emails.

Instructions

Read the FULL content of a single email by its UID (body, sender/recipients, date, attachment list, optional raw headers and text-attachment previews). By default the body is returned as clean Markdown in markdownContent and raw HTML is omitted so it never crosses the boundary; set bodyFormat to "html" for the legacy raw htmlContent, or "text" for plain text only. Use after imap_search_emails or imap_get_latest_emails gives you a uid. Body text is truncated to maxContentLength to protect the context window — raise it for long messages. To fetch attachment bytes, use imap_download_attachment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYesEmail UID
folderNoFolder nameINBOX
accountIdNoAccount ID (from imap_list_accounts). Optional if accountName is given or only one account is configured.
bodyFormatNoHow to return the body. "markdown" (default): clean Markdown via Turndown in markdownContent, raw htmlContent omitted so HTML never crosses the boundary. "text": plain text only in textContent. "html": legacy raw htmlContent. "auto": substantive text/plain if available, else Markdown.markdown
accountNameNoAccount name instead of accountId. Optional if accountId is given or only one account is configured.
includeHeadersNoInclude raw email headers (e.g. List-Unsubscribe, List-Unsubscribe-Post)
maxContentLengthNoMaximum characters to return for each body field (text/markdown/html)
includeAttachmentTextNoInclude text attachment previews when available
maxAttachmentTextCharsNoMaximum characters to return per text attachment
Behavior4/5

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

The description explains default return format (Markdown), truncation behavior, and parameter effects like bodyFormat and includeHeaders. It also mentions that HTML is omitted by default for security. However, it does not explicitly state that the tool is read-only, but the verb 'Read' implies no modification. Given no annotations, the description still provides good behavioral insight.

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 efficiently written, front-loading the core purpose in the first sentence. Each subsequent sentence adds distinct value (truncation, format options, alternative tool). No redundant or vague statements.

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?

Despite no output schema, the description conveys a clear picture of what the tool returns (body, metadata, attachment list, optional headers, text previews). It covers parameter effects and truncation. It also links to sibling tools for attachment bytes. For a tool with 9 parameters and no output schema, this is quite complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds meaningful context beyond the schema: it explains the purpose of maxContentLength for long messages, the differences between bodyFormat options, and mentions includeAttachmentText for previews. This extra context raises the score.

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 reads full email content by UID, specifying what is returned (body, headers, attachments). It distinguishes from sibling tools by referencing imap_search_emails and imap_get_latest_emails for obtaining UID.

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

Usage Guidelines5/5

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

It provides explicit usage context: use after imap_search_emails or imap_get_latest_emails to get a UID. It also directs users to imap_download_attachment for fetching attachment bytes. This is clear guidance on when to use this tool vs alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nikolausm/imap-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server