text_normalize
Normalize text (NFC, strip soft hyphens/zero-width, collapse whitespace) and return a two-way offset map to original code points for robust search and mapping offsets back to addresses.
Instructions
Normalise text (NFC, soft hyphens and zero-width characters removed, whitespace collapsed) and return a two-way offset map to the original code points, for the whole document, one paragraph or range (at, p142#a7b2a7b2:10-15), or a text string (give doc or text). Use it to compare or search text robustly and map found offsets back to addresses for text.replace; para.list normalized adds just the text. Read-only; paged at about 8,000 bytes with cursor; a very long paragraph comes in parts.
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": "text_normalize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | No | Paragraph address or range, e.g. p142#a7b2a7b2:10-15. | |
| doc | No | Path to a .docx. | |
| text | No | Text to normalise instead of `doc`. | |
| limit | No | Most items to return; a response is also capped at about 8,000 bytes. | |
| cursor | No | The `next` value of the previous response, to continue the list. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Always true on success. | |
| op | Yes | The operation that ran. | |
| api | Yes | API version (1.0). | |
| doc | No | The document read or written: path, sha256 and paragraph count. | |
| next | Yes | Cursor for the next page (pass as cursor), or null. | |
| result | Yes | What the operation returns. | |
| warnings | Yes | Things to know about the result. |