Skip to main content
Glama

read_attachment

Extract text from a single PDF or image page using cached transcription, native PDF text, or local OCR. Returns provenance and next page; OCR output is unverified.

Instructions

Read one PDF/image page: cached transcription, native PDF text, or local printed OCR.

For handwriting/math and mixed-image pages, use get_material_image with a vision model. Output records provenance and the next page; OCR/transcriptions are unverified.

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": {
      "attachment_id": "<attachment_id>"
    },
    "name": "read_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoauto
pageNo
cursorNo
max_charsNo
attachment_idYes

Output Schema

NameRequiredDescriptionDefault
pageYes
textYes
methodYes
statusYes
metadataYes
mime_typeYes
local_pathYes
page_countYes
size_bytesYes
source_urlYes
next_cursorYes
source_hashYes
attachment_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

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

Annotations only say readOnlyHint=false, openWorldHint=true, destructiveHint=false; the description adds real context beyond that by warning that OCR and transcriptions are unverified, that output records provenance, and that a next-page reference is returned. It does not explain why a read-shaped tool is flagged readOnlyHint=false (presumably caching/printing OCR artifacts), which would have resolved an agent's likely confusion.

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

Conciseness4/5

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

Two dense, front-loaded sentences with no filler, and the alternative-route warning is placed second where an agent will still see it. The phrasing is compressed to the point of terseness ('Output records provenance and the next page'), which costs a little readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so the return format need not be documented. However, with five parameters at 0% schema coverage, the pagination contract (cursor plus max_chars plus the returned next page) is the main thing an agent needs and it is only alluded to, so the definition is adequate rather than complete.

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 description coverage is 0%, so the description carries the full burden. It does explain the mode choices indirectly through 'cached transcription, native PDF text, or local printed OCR' and hints at page navigation via 'one page' and 'the next page', but cursor and max_chars are never mentioned, leaving two of five parameters opaque.

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 plus resource ('Read one PDF/image page') and enumerates the three extraction paths (cached transcription, native PDF text, local printed OCR), which maps directly to the mode enum. It also names the sibling to use for a different case (get_material_image for handwriting/math and mixed-image pages), so an agent can distinguish it from download_attachment or get_page 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?

Gives an explicit when-not-to-use rule with a named alternative: handwriting, math, and mixed-image pages should go to get_material_image with a vision model. What is missing is guidance on choosing between the mode values themselves (auto vs native vs local_ocr), which is left to the default.

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