Skip to main content
Glama

export

Export emails from your mailbox in various formats (eml, markdown, json, html, csv). Supports single messages, batch exports, conversation threads, or 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?

The description does not contradict annotations (readOnlyHint=false, destructiveHint=false), but adds minimal behavioral context beyond the targets. It doesn't disclose side effects like file creation (implied by savePath/outputDir) or whether export returns data vs saves to disk.

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 (3 sentences) with front-loaded purpose. Every sentence adds distinct value, covering the core modes without redundancy or unnecessary detail.

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 the tool's complexity (14 parameters, 4 modes, no output schema), the description lacks key details about return values, output format, or behavior across modes. It doesn't explain what the tool actually returns or how files are handled, leaving significant gaps for an AI agent.

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 100% (baseline 3), and the description adds significant value by explaining the meaning of the target parameter and how it affects the operation of other parameters, such as format restrictions and required fields.

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 'Export emails' and breaks down four distinct targets (message, messages, conversation, mime), each with a specific verb and resource. This provides unambiguous purpose and distinguishes between modes.

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 explains when to use each target based on the export scenario (single, batch, thread, raw content), but does not mention when to avoid this tool or compare it to sibling tools like read-email or search-emails, which could be alternatives for retrieving email content.

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-assistant'

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