Skip to main content
Glama

sp_read_document

Read-only

Read bounded text from a saved document snapshot at exact character offsets, paginate with offset and limit, and verify original bytes against expected_sha256.

Instructions

Read bounded source text at literal character offsets; paginate with next_offset. Every call verifies saved original bytes. Pin expected_sha256 from the open result.

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": {
      "snapshot_id": "<snapshot_id>"
    },
    "name": "sp_read_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
offsetNo
snapshot_idYes
expected_sha256No

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds a genuinely useful trait beyond them: every call re-verifies the saved original bytes against a hash, which tells the agent the read is integrity-checked. It does not cover failure behavior or what happens on hash mismatch.

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?

Two compact sentences, both front-loaded with operational facts and no filler. The reference to 'next_offset' is cryptic, since with no output schema the agent has no way to confirm that field exists in the response.

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

Completeness3/5

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

For a four-parameter read tool with no output schema and no schema descriptions, this is only partially adequate. The pagination contract references a return field that is never documented anywhere, and snapshot_id's origin is left to inference.

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?

Schema description coverage is 0%, so the description must carry the parameter burden. It does add real meaning for offset (literal character offsets, not lines or tokens) and expected_sha256 (pinned from the open result), but leaves limit and especially snapshot_id unexplained, so compensation is only partial.

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 and resource: reading bounded source text at literal character offsets, with pagination. That is clearly distinguishable from clause- or table-level readers implied by the sibling names, though it never names a sibling or explicitly contrasts itself with them.

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?

Usage is implied rather than stated: the mention of pinning expected_sha256 'from the open result' implicitly places this tool after sp_open_document, and 'paginate with next_offset' hints at iterative use. There is no explicit when-not guidance and no named alternative such as sp_read_clause or sp_search_document.

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