Skip to main content
Glama

Read a document

readDocument
Read-onlyIdempotent

Read a full document from the knowledge base by its storage key, when a search result is not enough. The key comes from searchDocuments or listDocuments.

Input Schema

NameRequiredDescriptionDefault
keyYesDocument key (full R2 path including folder prefix)
workspaceIdNoThe workspace, as listWorkspaces gives it (its id or slug). Leave it out when this connection reaches one workspace.

Output Schema

NameRequiredDescriptionDefault
keyYes
textYesThe document as text, up to 12000 characters
filenameYesThe name the file was uploaded with, to cite
truncatedYesThe document is longer than `text`
totalCharsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds that the returned content is the entire document rather than an excerpt, but says nothing about size limits, truncation of very large documents, or what happens when the key does not resolve — real behavioral questions for a read tool.

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 sentences, zero filler, with the core action and the usage condition front-loaded and the key-provenance detail trailing. Nothing repeats the title or the annotations.

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?

An output schema exists, so return values need not be described, and the annotations carry the safety profile. The description covers purpose, selection condition, and key origin; only the failure mode for an invalid key is left unstated, a minor gap for a two-parameter read.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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, but the description adds genuine provenance for the required 'key' parameter — that it originates from searchDocuments or listDocuments — which the schema does not state. It says nothing extra about workspaceId, though the schema field already explains its omission behavior.

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?

Specific verb ('Read') plus resource ('a full document from the knowledge base') with the addressing mechanism ('by its storage key') stated up front. It also implicitly distinguishes itself from the list/search siblings by emphasizing 'full document' rather than a snippet or result row.

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 a clear trigger condition ('when a search result is not enough') and names where the key must come from ('searchDocuments or listDocuments'), which routes the agent away from guessing keys. It stops short of an explicit when-not-to-use statement or a note about bulk reading multiple documents.

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