sgbr_get_page_ocr
sgbr_get_page_ocrFetches a single page's OCR text and block/line/word layout regions with pixel and percentage bounding boxes, so you can crop and visually verify exact page areas.
Instructions
Get one page's OCR text and layout regions (line/word boxes). Fetches IIIF hOCR for a single page and parses it into block/line/word regions, each with a pixel bbox_px and a region_pct — the latter is ready to pass straight to sgbr_inspect_image's region_pct argument to crop and visually verify that exact spot on the page. Also returns the page's plain OCR text (reading order) unless include_text is false. Text is uncorrected OCR, often Fraktur, so expect recognition errors. Identify the page by record id or scan_id plus a page; a fold-out plate id needs no page (it resolves to its own plate page, so a map or table's printed lettering can be read directly). If you do not yet know which page, use sgbr_locate_text to find the page(s) a phrase appears on first.
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_page_ocr"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Record id from an sgbr_search result. Resolves its scan id automatically. Provide this OR scan_id. | |
| page | No | Scanned-image page, 1-based (same axis as the viewer's ?page=N and sgbr_inspect_image `page`). Omit only for a fold-out plate `id`, which supplies its own plate page; every other address requires it. Passing a page other than a plate's own reads the parent volume instead, so the response `id` is null (that page is not what the plate record stands for). | |
| level | No | Granularity of returned regions. "line" (default) balances detail and size; "word" can be large; "page" returns only the page box + counts. | line |
| scan_id | No | Scan id from sgbr_get_record (`digital.scan_id`, e.g. "ZBZ-00123359"). Skips the id→scan lookup. Provide this OR id. | |
| max_regions | No | Cap on regions returned (default 200, max 2000). Excess regions are dropped in document order; the "truncated" flag reports when this happened. | |
| include_text | No | Also fetch the plain per-page OCR text (reading order). Set false to skip the extra fetch. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| page | Yes | ||
| text | Yes | ||
| level | Yes | ||
| counts | Yes | ||
| regions | Yes | ||
| scan_id | Yes | ||
| hocr_url | Yes | ||
| ocr_note | Yes | ||
| text_url | Yes | ||
| truncated | Yes | ||
| page_width | Yes | ||
| viewer_url | Yes | ||
| page_height | Yes | ||
| returned_regions | Yes | ||
| truncation_reason | Yes |