Skip to main content
Glama
tszaks

Gmail Multi-Inbox MCP Server

by tszaks

get_attachment

Fetch a single email attachment by ID, extract text from PDFs, Office docs, and images via OCR, and save it to Downloads.

Instructions

Fetch a single attachment by id. Use when you only need one specific file. For all attachments at once, use get_all_attachments instead. Requires the Gmail message ID ("Gmail ID" from get_email_thread) and the attachment_id. Saves to ~/Downloads/mcp-attachments/ and returns extracted text for PDF, DOCX, XLSX, PPTX, text, and images via OCR.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountYesAccount id.
email_idYesGmail message id.
attachment_idYesAttachment id from read_emails / get_email_thread metadata.
Behavior5/5

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

With no annotations, the description fully discloses behavior: it saves to ~/Downloads/mcp-attachments/ (a side effect) and returns extracted text for various formats including OCR for images. This is more than a bare fetch would imply.

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 compact, front-loaded with purpose, and every sentence contributes (purpose, usage, alternative, requirements, side effect, return format). No filler.

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

Completeness5/5

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

Despite having no output schema or annotations, the description covers what the tool does, when to use it, prerequisites, side effects, and return values. It is sufficiently complete for a single-attachment fetch tool.

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 coverage is 100% and descriptions are present, so baseline is 3. The description adds value by mapping email_id to the 'Gmail ID' from get_email_thread and reiterating the attachment_id source, which helps the agent resolve these IDs, though it mostly rephrases 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 'Fetch a single attachment by id' with a specific verb and resource, and explicitly distinguishes from get_all_attachments, making its scope unambiguous.

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

Usage Guidelines5/5

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

It gives explicit when-to-use guidance ('Use when you only need one specific file'), names the alternative ('For all attachments at once, use get_all_attachments instead'), and lists prerequisites (Gmail message ID and attachment_id).

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/tszaks/ghub'

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