Skip to main content
Glama
books-as-data
by kintopp

sgbr_get_fulltext

sgbr_get_fulltext
Read-onlyIdempotent

Read a digitized book's uncorrected OCR full text in paged character windows using a record or scan ID; page forward or read selected scan pages to handle large volumes in manageable chunks.

Instructions

Read one item's OCR full text in paged character windows. Books are large, so page forward with offset/next_offset, or read a span of scan pages with page_from/page_to. Identify the item by record id (from sgbr_search) or scan_id (from sgbr_get_record). Text is uncorrected OCR, often Fraktur, so expect recognition errors. A fold-out plate id is refused: a plate is one page and its scan_id is the parent volume's, so read the plate's own lettering with sgbr_get_page_ocr, or pass the parent scan_id here to read the whole volume deliberately.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sgbr_get_fulltext"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoRecord id from an sgbr_search result. The tool resolves its scan id automatically. Provide this OR scan_id.
offsetNo0-based character offset into the full text (or into the page span). Use the `next_offset` from a prior call to page forward.
page_toNoLast scan page to read (inclusive; defaults to page_from; at most 50 pages per call). Requires page_from.
scan_idNoScan id from sgbr_get_record (`digital.scan_id`, e.g. "UBBS-00190048"). Use it to skip the id→scan lookup. Provide this OR id.
max_charsNoMax characters to return in this window (15000 default, 60000 max). The window snaps to a word boundary.
page_fromNoRead from this scan page (the numbering sgbr_locate_text, sgbr_get_page_ocr and the viewer's ?page=N use) instead of the whole book. Each page is marked `--- page N ---`.

Output Schema

NameRequiredDescriptionDefault
idYes
textYes
offsetYes
page_toYes
scan_idYes
has_moreYes
ocr_noteYes
last_pageYes
page_fromYes
source_urlYes
viewer_urlYes
next_offsetYes
total_charsYes
returned_charsYes
window_page_toYes
window_page_fromYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.30.2

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses substantive behavior: text is uncorrected OCR often in Fraktur and should be expected to contain recognition errors, plate ids are refused with a documented reason, and page spans are marked '--- page N ---'. These are real behavioral traits an agent could not infer from annotations or schema.

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?

Four sentences, all front-loaded and purposeful: what it does, how to page, how to identify the item, and what the text quality is, then the plate exception. No filler and the most decision-relevant constraints (paging, plate refusal) come before edge detail.

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

Completeness5/5

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

For a paged-read tool with an output schema already covering return shape, nothing essential is missing: identification paths, paging strategy, page-span caps, and content-quality expectations are all covered. The high-complexity edge case (plates) is explicitly routed.

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 already 100%, so the baseline is 3, but the description adds genuine meaning about how the parameters interact: next_offset is the cursor for paging forward, page_from/page_to select a scan-page span rather than the whole book, and id versus scan_id trade a lookup for a shortcut. It stops short of adding format details beyond the schema.

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?

Opens with a specific verb and resource plus scope: 'Read one item's OCR full text in paged character windows.' It also distinguishes itself from siblings by naming sgbr_get_page_ocr for plate lettering and pointing to sgbr_search / sgbr_get_record as the sources for id and scan_id.

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?

Gives explicit operating modes (page forward via offset/next_offset, or read a span via page_from/page_to) and states the exclusion case: a fold-out plate id is refused, use sgbr_get_page_ocr instead, or deliberately pass the parent scan_id. That is when-to-use plus when-not-to-use plus the correct alternative.

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