Skip to main content
Glama

Read an attachment

messages_attachments_get
Read-only

Read one attachment of a message. The answer is what it says, as plain text; with as original it is the file itself, base64. messages_get and threads_get name a message's attachments and their sizes. Either answer names the address the original is served at whole, to a GET carrying this same credential.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asNotext, the default: what the file says. original: the file itself, byte for byte.
idYesAn attachment id, as a message read named it.
mailboxYesThe mailbox's name or its email address.
messageIdYesThe message's id, as a search or a read answered it.
continuationNoWhere the words resume, as the last part read named it. The original always comes whole.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
sizeYes
textNo
addressYes
charsetNo
outcomeNo
filenameYes
mimeTypeYes
returnedYes
messageIdYes
attachmentIdYes
continuationNo
contentFormatYes
sizePrecisionYes
carriesPayloadYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the read-only safety profile, and the description adds real context beyond them: the answer shape differs by the `as` parameter (plain text vs base64 file), and it discloses that a GET 'carrying this same credential' is required. It could say more about unsupported attachment types or failure modes, but the added auth and format context is valuable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

Three sentences, mostly front-loaded, but the final sentence ('Either answer names the address the original is served at whole, to a GET carrying this same credential') is syntactically tangled and harder to parse than its content warrants.

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 an output schema, full param coverage, and annotations, the description only needs to add what the structured data cannot: the format contract and the credential requirement, which it does. For a 5-param read tool it is nearly complete, missing only edge-case guidance.

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 coverage is 100%, so the baseline is 3. The description restates the `as` distinction ('what it says' vs 'the file itself, base64') and adds the continuation nuance ('The original always comes whole'), which the schema already conveys, so it adds little beyond the structured fields.

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 ('Read') and resource ('one attachment of a message'), and explicitly routes enumeration to the siblings by noting 'messages_get and threads_get name a message's attachments and their sizes.' An agent can distinguish this from messages_get/threads_get without opening a schema.

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 clarifies the relationship to alternatives by explaining that messages_get/threads_get only name attachments and sizes, implying this tool retrieves the content itself. It gives no explicit exclusions or prerequisite conditions, but the routing intent is clear.

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.