string_escape
Escape or unescape special characters in strings to prevent injection errors or restore original formatting.
Instructions
Escape or unescape special characters in strings.
Parameters:
text — String to escape or unescape.
mode — 'escape' (default) or 'unescape'.
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": "string_escape"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| mode | No | escape |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |