Skip to main content
Glama

export

Export emails as MIME, EML, markdown, JSON, MBOX, HTML, or CSV. Supports single messages, batch exports, conversation threads, and raw MIME content.

Instructions

Export emails. target=message exports one email. target=messages batch-exports. target=conversation exports a thread. target=mime gets raw MIME/EML content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNoExport target (default: message)
idNoEmail ID (target=message/mime, required)
formatNoExport format. Valid values vary by target: target=message accepts mime/eml/markdown/json/csv (mbox and html are conversation-only). target=conversation accepts eml/mbox/markdown/json/html/csv. target=messages (batch) accepts markdown/json/csv. mime is an alias for eml (same RFC822 bytes, .eml extension on disk).
savePathNoFile path or directory (target=message)
includeAttachmentsNoInclude attachments (default: true for single, false for batch)
emailIdsNoEmail IDs to export (target=messages)
searchQueryNoSearch query to find emails (target=messages, alternative to emailIds)
queryNoFree-text search shortcut (target=messages). Equivalent to passing searchQuery: { subject: <query> }. Convenience alias for callers used to search-emails.
outputDirNoOutput directory (target=messages/conversation, required)
conversationIdNoConversation ID (target=conversation, required)
orderNoMessage order (target=conversation, default: chronological)
headersOnlyNoMIME headers only, no body (target=mime)
base64NoReturn base64 encoded (target=mime)
maxSizeNoMax content size in bytes (target=mime, default: 1MB)
Behavior3/5

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

Annotations indicate readOnlyHint=false and destructiveHint=false, but the description implies file writing via savePath and outputDir, which is a side effect not clearly stated. The description does cover the main behavioral modes (single/batch/thread/raw), but the potential for local file creation could mislead an agent expecting a pure read operation.

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 extremely concise (4 sentences) and front-loaded with the critical distinction of the four targets. Every sentence adds value, avoiding any fluff.

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

Completeness2/5

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

Despite covering the main modes, the description lacks several important details: it does not mention what the tool returns (no output schema), nor does it explain conditional requirements (e.g., id required for message/mime, outputDir required for messages/conversation). For a tool with 14 parameters and complex conditional logic, this omission makes it incomplete for an agent to confidently invoke.

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?

Schema description coverage is 100%, so the baseline is 3. The main description adds a high-level mapping of parameters to targets but does not provide significant new meaning beyond what parameter descriptions already contain. Some groupings (e.g., format constraints per target) are already in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool exports emails and enumerates four distinct targets (message, messages, conversation, mime) with brief explanations. However, it could better differentiate from sibling tools like read-email or attachments, which also handle email content retrieval.

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

Usage Guidelines3/5

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

The description provides guidance on selecting a target and hints at format variations, which helps with basic usage. However, it does not explicitly advise when to use this tool over alternatives (e.g., search-emails for filtering), nor does it mention prerequisites or conditions for each target beyond what the schema describes.

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/littlebearapps/outlook-mcp'

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