Skip to main content
Glama
Edison-Watch

mcp-template

by Edison-Watch

gmail_get_attachment

Retrieve a single attachment or inline image from a Gmail message by providing message ID and attachment ID. Get base64-encoded bytes on demand without loading all attachments.

Instructions

Fetch the raw base64 bytes of a single attachment or inline image on a Gmail message, identified by the message_id + attachment_id echoed by gmail_get_thread. Use this to pull one file on demand instead of loading every attachment into the thread payload. data_base64 is raw encoded bytes, not a rendered image - you cannot read an image's contents from it; on vision-capable MCP hosts, image attachments are additionally rendered into context as a viewable image.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idNo
message_idYes
attachment_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNo
message_idYes
data_base64Yes
attachment_idYes
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses that data_base64 is raw encoded bytes, not a rendered image, and notes that on vision-capable hosts images are rendered as viewable. Lacks details on error handling or authentication, but covers the 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences: first defines the action, second provides usage guidance and a behavioral warning. No fluff, every sentence adds value.

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?

Covers the main aspects: what it does, how to identify attachment, output format, and image rendering caveat. Output schema exists but not shown; still, description is fairly complete. Could mention error scenarios but not critical.

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 has 0% description coverage, but description adds meaning: explains that message_id and attachment_id come from gmail_get_thread. Does not explain user_id (optional) but overall compensates for lack of schema descriptions.

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 it fetches raw base64 bytes of a single attachment or inline image, identifying the resource (attachment) and action (fetch). It distinguishes from siblings like gmail_get_thread and gmail_add_attachment by specifying it pulls one file on demand.

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?

Explicitly says to use when you need a single attachment instead of loading all, and warns that data_base64 is raw bytes, not a rendered image. Also mentions how to obtain message_id and attachment_id from gmail_get_thread.

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/Edison-Watch/Custom-MCPs'

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