Skip to main content
Glama

Read attachment

read-attachment
Read-only

Fetch an email attachment using its message and attachment IDs; text content is returned as plain text and binary files as base64-encoded data for processing.

Instructions

Reads an attachment from an email. Text content is returned as text; binary content is returned base64-encoded.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>",
      "attachmentId": "<attachmentId>"
    },
    "name": "read-attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesMessage id
attachmentIdYesAttachment id

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

readOnlyHint=true already establishes the safety profile, but the description adds real behavioral detail by disclosing that text content comes back as plain text while binary content is base64-encoded — something the agent cannot learn from the annotation. It does not cover failure modes, size limits, or how the two params are validated.

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, front-loaded with the action and then the return-format caveat. Every clause earns its place with no filler.

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?

For a simple two-parameter read tool with full schema coverage and an output schema, the definition covers what it does and how results are encoded. The only gap is guidance on choosing between this tool and the sibling attachment tools.

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 both required parameters (id, attachmentId) are already documented in the input schema. The description adds no meaning beyond that, so the baseline 3 applies.

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?

The description states a specific verb and resource: 'Reads an attachment from an email.' It also clarifies the two return modes (text vs. base64). It does not explicitly distinguish itself from the sibling download-attachment, so an agent must infer the difference from the encoding note.

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?

Usage is only implied: the tool fetches attachment content inline, and the base64 note hints at a distinction from download-attachment. There is no explicit when-to-use, when-not-to-use, or named alternative, leaving the agent to infer the routing decision.

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