Skip to main content
Glama

read_document

Read-only

Reads exact Markdown with bounded comment previews, revision-aware pagination, and archived reviews so you can inspect document content and comments while preserving context.

Instructions

Exact Markdown with bounded comment previews. Follow textPage/quotePage via commentId and commentField for full originals. Reuse revision AND commentsRevision; new comments remain visible when content is unchanged. Follow nextOffset/expectedRevision and commentsPage.nextCursor. archiveName reads retained reviews using the original change id.

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": {
      "id": "<id>",
      "path": "<path>"
    },
    "name": "read_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
pathYes
limitNo
offsetNo
commentIdNo
archiveNameNo
commentFieldNo
commentsLimitNo
knownRevisionNo
workspacePathNoTrusted absolute project path from this chat; pass on every call. null selects personal storage. Omission uses only the environment default.
commentsCursorNo
expectedIdentityNo
expectedRevisionNo
knownCommentsRevisionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.1

TDQS

C2.8/5.0
Behavior4/5

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

Beyond the readOnlyHint/openWorldHint annotations, the description discloses genuinely useful behavior: comment bodies are bounded previews that must be fetched via commentId/commentField, revisions and commentsRevision can be reused, new comments stay visible when content is unchanged, and archiveName reads retained reviews via the original change id. Missing only the concrete return shape and error/auth conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is compact with no filler, but it is a telegraphic stack of fragments with no topic sentence establishing what the tool returns. It also references fields (textPage, quotePage, nextOffset, commentsPage.nextCursor) that exist nowhere in the schema or an output schema, forcing the agent to guess at shape.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter, read-only tool with caching semantics, dual pagination streams, and no output schema, the description should define the response envelope and the meaning of id versus path. Instead it names response fields it never explains, leaving an agent unable to predict what comes back or how the two required parameters relate.

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?

With schema description coverage at 7% and 14 parameters, the description must carry the load, and it does for a subset: commentId + commentField select text/quote originals, archiveName keyed by original change id, offset/expectedRevision pagination, commentsCursor for comment paging, and the two knownRevision variants. It says nothing about id, path, limit, commentsLimit, or expectedIdentity, leaving a large documented gap.

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

Purpose3/5

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

The phrase "Exact Markdown with bounded comment previews" implies returning a document's raw Markdown with truncated comment context, but there is no verb-led statement of what the tool actually does. Nothing distinguishes it from the sibling read_project_document, so an agent must infer the difference from the name alone.

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

Usage Guidelines2/5

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

The description offers no when-to-use, when-not-to-use, or alternative-tool guidance despite read_project_document, read_change_file, and save_document sitting alongside it. Instructions are entirely about follow-up mechanics (pagination, revision reuse) rather than tool selection.

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