regex_replace
Replace portions of text by matching a regex pattern and substituting with a replacement string, with optional flags.
Instructions
Replace text using a regex pattern
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>",
"pattern": "<pattern>",
"replacement": "<replacement>"
},
"name": "regex_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to perform replacements on | |
| pattern | Yes | The regex pattern to match | |
| replacement | Yes | The replacement string | |
| flags | No | Regex flags (e.g., 'g', 'i', 'gi') | g |