replace_content
Replace text patterns in files using literal or regex matching to modify code content within the Serena coding toolkit.
Instructions
Replace pattern in file.
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": {
"relative_path": "<relative_path>",
"needle": "<needle>",
"repl": "<repl>",
"mode": "<mode>"
},
"name": "replace_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| relative_path | Yes | ||
| needle | Yes | ||
| repl | Yes | ||
| mode | Yes | ||
| allow_multiple_occurrences | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |