Wrap a line for display
wrap_for_displayMake one mixed Hebrew/English display line render correctly: every left-to-right unit (a Latin term, a price, a number with its unit, a range such as "10–20%", a date, a comparison such as "<5") is kept whole and in order, so nothing is reversed or mirrored inside a Hebrew line. format: html (dir spans, for web and React), isolate (Unicode isolates, for iOS, Android 7+ and browsers) or marks (LRM/RLM, for any renderer including older Android). Pass base: "rtl" for a Hebrew line that starts with a Latin term. Deterministic and free: no character quota.
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": {
"text": "<text>"
},
"name": "wrap_for_display"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | Paragraph direction of the display surface. Pass `rtl` for a Hebrew line even when it starts with a Latin term. | auto |
| text | Yes | The display line, up to 20,000 characters. | |
| format | No | `html` for the web; `isolate` (Unicode isolates) for modern text engines; `marks` (LRM/RLM) for every renderer, including older Android. | html |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dir | No | Paragraph direction used. | |
| runs | No | The display runs the output was built from. | |
| format | No | Format used. | |
| output | No | Render-ready text: HTML with `dir` spans, or the text with Unicode isolates or direction marks inserted. |