Skip to main content
Glama
samishekhalard

rag-mcp

rag_read_document

Reads an entire indexed document in order by document ID, returning complete source content instead of retrieved fragments. Use when the document is the right source and you need all of it.

Instructions

Read an entire indexed document, in order.

Use when a document is clearly the right source and you want all of it rather than retrieved fragments. Large documents produce long output — prefer rag_search or rag_read_around when you only need one section.

Input Schema

NameRequiredDescriptionDefault
doc_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the burden; 'Read' implies a safe read-only operation, and it discloses the main real risk — that large documents produce long output. It does not say whether output is ever truncated or capped, which is the one behavioral detail missing for a tool whose contract is 'entire document'.

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?

Three short sentences, front-loaded with the action and scope, then usage condition, then the cost warning. No filler and the cautionary guidance is placed after the primary instruction where it belongs.

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?

Output schema exists, so return format needn't be described, and the cost/verbosity tradeoff against siblings is covered. The remaining gap is the undocumented doc_id and the unresolved question of whether a very large document is truncated despite the promise of reading it 'entirely'.

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

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter doc_id has 0% schema description coverage, so the description is the only place its meaning could be established — but doc_id is never mentioned, nor where to obtain an identifier (presumably from rag_search results) or what form it takes. The coverage gap is left entirely uncompensated.

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 plus resource plus scope: 'Read an entire indexed document, in order' tells the agent both the operation and that the result is complete and ordered, not a fragment. This is directly contrastable with rag_search and rag_read_around which return partial content.

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 condition ('when a document is clearly the right source and you want all of it') plus named alternatives with the condition that selects them ('prefer rag_search or rag_read_around when you only need one section'). Both the positive case and the exclusion are stated.

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