Skip to main content
Glama

globalise_navigate_viewer

Zooms or pans an already-open page viewer to a selected scan region, directing the user’s view to a detail; requires a viewUUID from a prior view call.

Instructions

Zooms or pans the user's already-open page viewer to a region. Use it to steer the user's view to a detail. Requires a viewUUID from a prior globalise_view_document_ui call (the viewer must be open). Not for opening the viewer — use globalise_view_document_ui. Not for visual analysis — use globalise_inspect_page_image (which also zooms the viewer whose viewUUID you pass).

By default, region coordinates are in full-image space (percentages or pixels of the original scan), not relative to the current viewport — the same pct:x,y,w,h used in globalise_inspect_page_image targets the identical area here. Exception: when a command includes relativeTo, region is interpreted in that inspected crop's local coordinate space.

Coordinates need to come from an inspected image: the scan's layout is unknown until globalise_inspect_page_image has returned it, so inspect the target area first and reuse (or refine) those coordinates here.

Region formats: 'pct:x,y,w,h' (percentage of the full scan), 'crop_pixels:x,y,w,h' (pixels of the full scan — bound with nativeWidth/nativeHeight from globalise_inspect_page_image; when used with relativeTo + relativeToSize it is instead pixels within that crop), 'x,y,w,h' (legacy IIIF pixels), or 'full' | 'square'. Out-of-bounds regions are rejected with a recovery hint — correct and retry.

Coordinate shortcut: to zoom to a sub-region of a prior inspect crop, pass relativeTo with the crop's region string and give region in crop-local coordinates (pct: directly, or crop_pixels: with relativeToSize:{width:cropPixelWidth,height:cropPixelHeight}) — the server projects to full-image space deterministically.

The deliveryState field says whether the iframe drained the commands immediately (delivered_recently), the viewer exists but has not polled recently so the commands are queued (queued_waiting_for_viewer — typical when scrolled offscreen), or no viewer has connected yet (no_live_viewer_seen). In the queued case the command is preserved server-side and applies when the viewer resumes polling — a normal delivery state, not a failure. no_live_viewer_seen is normal in the first few seconds after globalise_view_document_ui returns (the widget iframe starts polling only once the host renders it) — the queued commands apply on its first poll, so there is no need to wait or re-send. An unknown or expired viewUUID is a different, explicit error (sessions expire after ~30 min idle; re-open with globalise_view_document_ui). Host caveat: the reverse channel requires the host's MCP Apps bridge to support app-initiated tool calls (serverTools) — on hosts without it the iframe never polls and queued commands are never delivered; the response says so once the viewer is >30s old; then give the user a viewer link (globalise_inspect_page_image is for reading the detail yourself).

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": {
      "viewUUID": "<viewUUID>",
      "commands": "<commands>"
    },
    "name": "globalise_navigate_viewer"
  }
}

Input Schema

NameRequiredDescriptionDefault
commandsYesCommands to execute in the viewer, in order
viewUUIDYesViewer UUID from a prior globalise_view_document_ui call

Output Schema

NameRequiredDescriptionDefault
errorNo
queuedYes
viewUUIDYes
documentIdNoDocument ID of the page in this viewer session.
imageWidthNo
imageHeightNo
lastPolledAtNoISO timestamp of the iframe's last poll. Absent if the iframe has never polled this session.
deliveryStateNoServer's view of command delivery: delivered, queued for an existing-but-offscreen viewer, or no viewer ever connected.
regionRecoveryNoOut-of-bounds recovery hint. Present only on a region-out-of-bounds error — mirrors the recovery payload the text channel renders, so a structuredContent reader can self-correct without parsing prose.
pendingCommandCountNoCommands sitting in the queue that the iframe has not yet drained.
recentlyPolledByViewerNoTrue if the iframe polled within the last 5s.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing delivery semantics (delivered_recently / queued_waiting_for_viewer / no_live_viewer_seen), that queued commands are preserved server-side and not a failure, ~30 min idle session expiry, out-of-bounds rejection with a recovery hint, and a host bridge caveat with a fallback action. The description's mutation of viewer state is consistent with readOnlyHint=false and destructiveHint=false.

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

Conciseness3/5

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

The purpose and exclusion sentences are front-loaded and earn their place, but the body is long for a two-parameter tool and repeats itself — the relativeTo + crop_pixels projection rule is explained in the 'Region formats' paragraph and again in the 'Coordinate shortcut' paragraph. The deliveryState discussion is thorough but verbose.

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?

Given an output schema exists, the description still usefully explains what deliveryState values mean and how to react to each, plus error/recovery, expiry, and host-support failure modes. Nothing an agent needs to call this correctly and interpret the result appears to be missing.

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 100%, so the baseline is 3, but the description adds meaning the schema does not: region coordinates default to full-image space rather than the current viewport, and coordinates should originate from a prior inspected image. The relativeTo/relativeToSize projection rules are largely restated from the schema, which caps this below 5.

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 concrete verb+resource+scope: 'Zooms or pans the user's already-open page viewer to a region.' It then explicitly distinguishes itself from globalise_view_document_ui (opening) and globalise_inspect_page_image (visual analysis), so an agent can route correctly without opening any schema.

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 when-to-use ('steer the user's view to a detail'), explicit when-not ('Not for opening the viewer', 'Not for visual analysis'), and names the alternative for each excluded case. It also states the prerequisite (viewUUID from a prior globalise_view_document_ui call, viewer must be open).

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