Skip to main content
Glama
pjosols
by pjosols

mail_import_email

Import an uploaded .eml email message into your mail store by specifying the blob ID and mailbox IDs. Optionally set JMAP keywords and a received timestamp.

Instructions

Import a raw RFC 5322 message blob into the mail store.

The blob must already be uploaded (use mail_upload_attachment to get a blobId). The .eml content must be a valid RFC 5322 message with at minimum Date and Message-Id headers — a bare body without proper headers will be rejected.

Args: blob_id: blobId of the uploaded .eml blob. mailbox_ids: List of mailbox IDs to place the email in. keywords: Optional JMAP keywords (e.g. ["$seen", "$flagged"]). received_at: Optional UTC timestamp (ISO 8601) for receivedAt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blob_idYes
mailbox_idsYes
keywordsNo
received_atNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Given no annotations, the description discloses that a bare body without proper headers will be rejected and explains the required headers. It does not mention side effects (e.g., indexing, notifications), but the information provided is sufficient for understanding core behavior.

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 a summary followed by an Args list. It is front-loaded with the main action and each sentence adds value. Slightly verbose but efficient overall.

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 an output schema present, the description does not need to detail return values. It covers the import process, prerequisite, and parameter behavior adequately for a complex operation. It could mention where to obtain mailbox_ids, but overall comprehensive.

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 description coverage is 0%, so the description compensates by explaining each parameter (blob_id, mailbox_ids, keywords, received_at) with examples and constraints (e.g., ISO 8601). It adds meaning beyond the schema's field names and types.

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 imports a raw RFC 5322 message blob into the mail store. It differentiates from sibling tools like mail_upload_attachment (uploads blob) and mail_export_email (exports), establishing a unique purpose.

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 specifies prerequisites: the blob must be uploaded via mail_upload_attachment and must have valid headers. It does not explicitly state when not to use this tool compared to alternatives like mail_parse_email, but the prerequisite and parameter details provide clear guidance.

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