Skip to main content
Glama
pjosols
by pjosols

mail_get_email

Retrieve a single email by ID with full body content, attachment metadata, and optional named headers. Choose between HTML and plain text body.

Instructions

Get a single email by ID with full body content and attachment metadata.

Optionally fetch specific headers by name. JMAP requires headers to be requested by name — no wildcard fetch is supported. Use mail_export_email to retrieve all raw headers.

Common useful headers:

  • X-Delivered-To: original envelope recipient

  • X-SimpleLogin-Envelope-To: SimpleLogin alias that received the email

  • X-SimpleLogin-Original-From: real sender behind a SimpleLogin reverse alias

Args: email_id: The JMAP email ID. prefer_html: Return HTML body if available; defaults to plain text. headers: Optional list of header names to fetch (e.g. ["X-Delivered-To"]).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
email_idYes
prefer_htmlNo
headersNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the burden. It describes the return of body content and attachment metadata, and explains the header fetching limitation. However, it does not cover potential errors, rate limits, or authentication requirements.

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 well-structured with paragraphs and a bullet-point list for common headers. It is concise but could be slightly more streamlined without losing clarity.

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 there is an output schema, the description does not need to detail return values. However, it lacks information about error conditions, such as what happens if the email ID is invalid or not found, which would be helpful for completeness.

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

Parameters5/5

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

Schema description coverage is 0%, so the description compensates fully. It explains email_id as the JMAP ID, prefer_html with default behavior, and headers with a list of examples and common useful headers, adding significant value 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 clearly states it gets a single email by ID with full body and attachment metadata, and optionally fetches specific headers. It distinguishes from sibling tools like mail_export_email and mail_get_email_thread.

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 when to use this tool vs. mail_export_email for raw headers, and notes JMAP's requirement to request headers by name. It does not explicitly state when not to use, but gives clear context.

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/pjosols/pyfastmail-mcp'

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