Skip to main content
Glama

get_attachment

Read-onlyIdempotent

Fetch one attachment on demand. The content is returned as base64 with its MIME type.

Input Schema

NameRequiredDescriptionDefault
accountIdYes
messageIdYesPass the full opaque message ID exactly as returned by search_emails, get_email, or a completed action. Never decode, reconstruct, shorten, or otherwise alter it. After archive_email or move_email completes, use its returned replacement messageId for later message operations.
attachmentIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / messageId / description
      Added value: +"Pass the full opaque message ID exactly as returned by search_emails, get_email, or a completed action. Never decode, reconstruct, shorten, or otherwise alter it. After archive_email or move_email completes, use its returned replacement messageId for later message operations."
  2. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, openWorld, so the safety profile is covered. The description adds genuinely new behavioral context: the response payload format is base64 with an accompanying MIME type, which is not derivable from the annotations and matters because there is no output schema.

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 short sentences, no filler; the purpose is front-loaded and the return-format fact follows immediately. Every clause 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?

With no output schema, the description does the minimum needed by disclosing the return shape (base64 content + MIME type), and annotations carry the safety profile. It is slightly thin on practical caveats such as size limits, whether the attachment may be unavailable, or auth requirements for the account, but nothing blocks a correct call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 33%: accountId and attachmentId have no descriptions anywhere, and the description adds zero parameter guidance (no mention of ID formats, scoping, or the distinction between messageId and attachmentId). Only messageId is documented, and that text lives in the schema, not the description. The description fails to compensate for the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a clear verb and resource ('Fetch one attachment') and adds a useful scope hint ('on demand'), which implies the attachment body is not delivered inline with message reads. It reads clearly against get_email/get_thread, though it never names a sibling to route the agent explicitly.

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 phrase 'on demand' implies the calling context (retrieve the binary when the agent actually needs it, rather than during listing or message fetch), but there is no explicit when-to-use, when-not-to-use, or named alternative among the 20 siblings.

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.

Resources