Skip to main content
Glama

Read Attachment Text

read_attachment_text
Read-only

Read the contents of one attachment (e.g. an LOI or lease) to answer questions about it. Pass a "query" to get only the relevant passages (recommended) instead of the whole document. Extracts text for PDFs (text layer OR scanned/image PDFs via OCR), docx, and txt/csv/html. A scanned PDF may return "status":"processing" on the first read while OCR runs — just read it again in a few seconds. For types it cannot extract (images, spreadsheets, legacy .doc), it returns "extractable":false with a "share_with_user" instruction: do NOT try to fetch the "url" yourself — give that link to the user so they can open the document. The "url" is a short-lived download link, meant for the user, not for you to fetch.

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_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryNoOptional. If given, returns only passages matching this term (cheaper and more precise than the whole document, e.g. "exclusive", "co-tenancy", "rent commencement").
attachment_idYesThe attachmentid (a GUID string) from list_attachments

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly/openWorld/non-destructive, but the description goes far beyond them: OCR may return status 'processing' on first read requiring a retry, unsupported types return 'extractable':false with a share_with_user instruction, and the URL is a short-lived download link meant for the user. These are exactly the behaviors an agent could otherwise get wrong.

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?

Front-loaded with purpose, then query recommendation, then format coverage, then edge-case handling. Every sentence carries distinct actionable information with no filler despite the length.

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?

Covers purpose, the recommended query mode, supported/unsupported formats, async OCR retry semantics, and correct handling of the download link. With no output schema, this is everything needed to call and interpret the tool correctly.

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 100% and the 'query' parameter already documents that it returns matching passages with examples, so the description adds only the recommendation/cheaper framing. Baseline 3 applies since the schema carries the semantic load.

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 and resource ('Read the contents of one attachment') plus a concrete purpose ('to answer questions about it'), with concrete examples (LOI, lease) and the supported formats listed. An agent can distinguish this from listing or adding attachments without opening the 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 explicit operational guidance: pass a 'query' to get relevant passages and that this is 'recommended' over whole-document reads, retry after a 'processing' status, and never fetch the returned URL yourself but hand it to the user. It lacks a named comparison against sibling read/listing tools, so it falls just short of a full when-to-use/when-not framework.

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