Skip to main content
Glama

gmail_bulk_export

Bulk-export Gmail messages matching a search query to a directory, saving message JSON, text/HTML bodies, attachments, and an index.

Instructions

Bulk-export messages matching a Gmail search query to a directory. Per message: <dest_dir>//{message.json, body.txt, body.html, attachments/...}. Also writes <dest_dir>/index.json summarizing all exported messages.

Input Schema

NameRequiredDescriptionDefault
emailNoGoogle account email. May be omitted when exactly one account is configured; required when multiple accounts are configured.
queryYesGmail search query
dest_dirYesAbsolute path; created if missing
max_messagesNoDefault 200
include_html_bodyNoDefault true
include_attachmentsNoDefault true

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the significant side effect of writing files to disk and the exact artifact layout, which is valuable. However, it says nothing about authentication requirements, rate limits, or how partial failures mid-export are handled, which for a bulk mutation tool is a notable gap.

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?

Two tight sentences with zero filler, and the primary purpose is front-loaded before the output layout detail. Every sentence earns its place.

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?

There is no output schema, so the description must cover return values, and it does so precisely by describing the per-message directory, the named files, and the index.json summary. It falls short only on error/partial-completion behavior and auth expectations for a tool that writes to an arbitrary absolute path.

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 all six parameters (including defaults for max_messages, include_html_body, include_attachments, and the email account-selection rule) are already documented in the schema. The description adds no syntax or format detail for these parameters beyond what the schema provides, so the baseline 3 applies.

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?

States a specific verb (bulk-export), resource (messages), scoping mechanism (matching a Gmail search query), and destination (a directory). This clearly separates it from gmail_search and gmail_download_attachments, which an agent can distinguish without opening any schema.

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 word "bulk" and the query-matching framing imply when this tool is appropriate versus a single-message sibling, but the description never states when-not to use it or names an alternative for non-bulk retrieval. Usage is inferable but not explicit.

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