Skip to main content
Glama

Read a document's file

get_document_file
Read-onlyIdempotent

The original file of one document, for reading it yourself: a PDF comes back as the file, a picture as an image, a text or CSV file as text. Use it when get_document_data does not have the answer, to check a value against the original, or when the user asks to see or read the document. Prefer get_document_data first: it is smaller and already structured. Only documents with downloadable true in list_documents have a file. PDFs up to 5 MB, pictures up to 3.75 MB and text up to 200 KB can be sent; spreadsheets and other formats cannot be read here, so use get_document_data for them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYesA document id such as "doc_45", as returned by list_documents.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare it read-only, idempotent, and non-destructive, but the description adds substantial operational context beyond them: which formats are readable, size ceilings (5 MB PDF / 3.75 MB images / 200 KB text), and that spreadsheets cannot be read here. This is exactly the value-add the annotation baseline asks for.

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 what the tool returns, then routing guidance, prerequisite, and limits. Five sentences all carry distinct load; none is filler.

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?

With no output schema, the description compensates by describing the return shape per format, and it covers the routing, prerequisite, and size/format constraints an agent needs to call this correctly. Nothing material is missing.

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?

Only one parameter and schema coverage is 100%, so the schema fully documents document_id including its list_documents origin. The description adds no syntax or format detail beyond the schema, so the baseline 3 applies.

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 resource (the original file of one document) and concretely describes what comes back per format (PDF as file, image as image, text/CSV as text). It is clearly distinguishable from get_document_data, which is named as the structured-data alternative.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use (when get_document_data lacks the answer, to verify a value, or when the user asks to see the document), explicit when-not/prefer alternative (prefer get_document_data first because it is smaller and structured), and a hard prerequisite (only `downloadable` true documents have a file).

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