Skip to main content
Glama

Get attachment

get_attachment
Read-onlyIdempotent

Returns an attachment. Text-like files (txt, csv, json, xml) come back as text. Anything else comes back as a download link valid for one hour: give that link to the user instead of reading the file. Only pass inline=true when the file content itself is needed in the conversation (max 2097152 bytes).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYes
partYespart id from get_message
folderNoFolder/label path. Defaults to All Mail on Gmail, INBOX elsewhere.
inlineNoEmbed the binary content in the result instead of returning a link
accountYesAccount id from list_accounts

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark this as read-only and idempotent. The description adds substantial behavioral context: text-like files are returned as text, other files as one-hour download links, link handling instructions, and the 2097152-byte inline limit.

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 three dense, purposeful sentences. The main behavior is front-loaded, with the inline guidance and limit following naturally, and there is no redundant 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?

Even with no output schema, the description fully explains return formats, link validity, the user-facing action, and when inline content is appropriate. An agent has enough information to call this tool correctly in most situations.

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 80%, and the description adds meaning beyond the schema by explaining when inline=true should be used and the size limit. The uid and part parameters remain minimally described, but the schema already points to get_message for part id, so the description is not the main gap.

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 a specific action (returns an attachment) and resource, and goes further by explaining how different attachment types are returned. It is distinct in purpose from siblings like upload_attachment or get_message.

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

Usage Guidelines4/5

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

It gives explicit guidance on when to use inline=true versus returning the download link, and instructs the agent to hand the link to the user rather than reading binary files. It does not explicitly name sibling alternatives or when-not-to-use conditions, so it stops short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.