sgbr_inspect_image
sgbr_inspect_imageFetch a scanned book page image for visual inspection; crop specific regions to examine maps, plates, music notation, or verify OCR accuracy, then share the page viewer link.
Instructions
Fetch one page image and inspect it yourself for the user. Returns image bytes for your own visual analysis. The client may also show the image to the user; that is expected, so neither avoid the call nor try to hide or comment on the image for that reason. To link the user to the page itself, give the result's viewer_url when present. Best for inherently visual material (e.g. maps, plates, music notation) or to sanity-check unreliable OCR from sgbr_get_fulltext. Identify the page by record id or scan_id plus a page; if the user pastes a viewer link .../detail/{id}?page={n}, extract {id} and {n}. Pass region_pct to crop to part of the page (e.g. a page-number corner or one figure of a plate) at a fraction of the payload — those region_pct values can come straight from sgbr_get_page_ocr's or sgbr_locate_text's layout regions. A crop is delivered at its own scanned resolution, so a word-sized region arrives small and cheap; when you need more detail, widen region_pct rather than raising max_long_edge — only a larger region carries more pixels. A non-error result is the page image itself (the pixels are included; see byte_size): describe what you see in it. A fetch failure arrives as an explicit error result, never as an empty image.
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_inspect_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Record id from an sgbr_search result. The tool resolves its scan id automatically. Provide this OR scan_id. | |
| page | No | Scanned-image page to fetch, 1-based (the same axis as the viewer's `?page=N` deep link). Defaults to 1 — except a foldout/Falttafel record addressed by `id`, whose own plate page is resolved automatically (override by passing `page`). Note the thumbnail page shown by sgbr_get_record is often a different, editorially-chosen "representative page" — request the page you actually want. | |
| scan_id | No | Scan id from sgbr_get_record (`digital.scan_id`, e.g. "UBBS-00190048"). Use it to skip the id→scan lookup. Provide this OR id. | |
| region_pct | No | Optional sub-region crop as percentages of the full page: [x, y, width, height], top-left origin. E.g. [0, 85, 30, 15] = the bottom-left corner (good for reading a printed page number cheaply), [25, 25, 50, 50] = the centre. Omit for the whole page. The crop is delivered at its own scanned resolution, never enlarged, so a small region arrives small and cheap — prefer a crop over a full page whenever you only need part of it. | |
| max_long_edge | No | Upper bound on the image's longest edge in pixels (400-1988, default 1988 = the largest that reaches you undownscaled). This is a ceiling, not a target: the image is also capped at the region's own scanned resolution, so a small crop arrives small (and cheap) no matter what you pass here. Request smaller only for frugality; to see more detail, change region_pct, not this. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| page | Yes | ||
| scan_id | Yes | ||
| warnings | No | ||
| byte_size | Yes | ||
| long_edge | Yes | ||
| mime_type | Yes | ||
| region_pct | Yes | ||
| source_url | Yes | ||
| viewer_url | Yes | ||
| visual_tokens | Yes | ||
| delivered_width | Yes | ||
| delivered_height | Yes |