Skip to main content
Glama

document_read

Read-onlyIdempotent

Read exact text from PDF, DOCX, MD, or TXT units by page, line, or paragraph range, returning offsets, a hash, and a cursor to resume whenever output is cut short.

Instructions

Verbatim text of units start..end (PDF pages, MD/TXT lines, DOCX paragraphs; end omitted = to the end), up to max_chars. Never summarized or filtered. The excerpt carries offsets and SHA-256; if cut, truncated=true, remaining_chars says how much is left and next_cursor continues exactly. [docbridge schema 0.2.4]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
startNo
cursorNo
encodingNoText encoding of a .md/.txt input. Omit for UTF-8; docbridge never guesses.
max_charsNoMost characters returned; a cut is always stated, with a cursor to continue.
input_pathYesAbsolute file path.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolYes
errorNo
matchNo
sourceNo
excerptNo
invariantNodocbridge may reduce the volume of its own responses, but it never alters, summarizes, paraphrases, semantically filters, or silently truncates source evidence
truncatedNoTrue if anything in the requested range was not returned.
next_cursorNoPass as `cursor` to document_read to continue exactly.
before_cursorNo
schema_versionYes
remaining_charsNoCharacters of the requested range after the excerpt.
requested_unitsNo
unreadable_unitsNoUnreadable units inside this excerpt.
operation_completedYes
omitted_before_charsNo
range_unreadable_unitsNoEvery unreadable unit of the whole requested range, returned or not.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.4

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered; the description then adds genuinely valuable behavior beyond that – truncation semantics (truncated=true, remaining_chars, next_cursor continues exactly), SHA-256 offsets on the excerpt, and the 'docbridge never guesses' encoding stance. It stops short of describing error modes, but this is well above the annotation baseline.

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?

A single dense paragraph with no filler; the core purpose and range semantics are front-loaded, followed by truncation/continuation detail. The parenthetical format list and trailing schema version tag slightly compress readability but every clause carries information.

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?

Since an output schema exists, the description needn't enumerate return fields, and it appropriately focuses on the truncation/cursor contract that governs paging. For a six-parameter, multi-format read tool this is nearly complete; only the absence of any sibling routing leaves a small gap.

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 description coverage is only 50%, so start, end, and cursor carry no schema-level docs; the description compensates by defining the units of start/end (pages/lines/paragraphs), the 'end omitted = to the end' default, and cursor continuation semantics. It adds little about encoding or input_path, but those are already documented in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Verbatim text of units start..end') and clarifies what a 'unit' means per format (PDF pages, MD/TXT lines, DOCX paragraphs), so the agent knows exactly what is returned. It does not explicitly differentiate itself from the sibling document_read_around or document_search, which is the only gap.

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

Usage Guidelines3/5

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

'Never summarized or filtered' implicitly contrasts this with a summarizing/search tool, and the start..end/cursor mechanics imply the range-read use case. However, no sibling is named and there is no explicit when-to-use-this-vs-alternative guidance (e.g., vs document_read_around for context windows).

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