page_guard_hwpx
Verify that a newly built HWPX file matches the reference page structure by comparing paragraph/table counts, dimensions, breaks, and text length. Use for same-structure edits to catch unintended layout drift.
Instructions
Check that output HWPX has not drifted in page count vs a reference.
Best for SAME-STRUCTURE edits (filling values into a form, replacing text in-place without adding/removing paragraphs or tables). When sections are added, removed, or restructured, expected differences will be reported as failures — in that case use validate_hwpx for integrity checks instead.
Compares paragraph count, table count, table dimensions, explicit page/column breaks, and overall text length between reference and output.
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": {
"reference_hwpx": "<reference_hwpx>",
"output_hwpx": "<output_hwpx>"
},
"name": "page_guard_hwpx"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output_hwpx | Yes | Absolute path to the newly built .hwpx file. | |
| max_text_delta | No | Allowed total text-length change (0.15 = 15%). | |
| reference_hwpx | Yes | Absolute path to the original reference .hwpx file. | |
| max_paragraph_delta | No | Allowed text-length change per paragraph (0.25 = 25%). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |