analyze_page
Classify page items into semantic roles for targeted batch edits. After scanning a document, label elements like headers, images, and captions to enable role-based actions.
Instructions
Classify page items into semantic roles (Header, Subtitle, Body, Caption, Image, Background, Logo, Decorative, Unknown) and store them on the Document Model. Call after scan_document so batch targets like {role:"Header"} work. Typical flow: scan → analyze_page → execute_batch → summarize_changes.
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": {
"pageIndex": "<pageIndex>"
},
"name": "analyze_page"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| persist | No | Write roles into session cache (default true) | |
| pageIndex | Yes | 0-based page index to analyze |