replace_in_file
Apply literal or regular-expression replacements in a file to update Beat Saber mod source or configuration, with dry-run preview for controlled edits.
Instructions
Replace text in a file (literal or regular expression), mirroring BSMT's ReplaceInFile task.
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": {
"file": "<file>",
"pattern": "<pattern>",
"substitute": "<substitute>"
},
"name": "replace_in_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| dry_run | No | ||
| pattern | Yes | ||
| multiline | No | ||
| use_regex | No | ||
| singleline | No | ||
| substitute | Yes | ||
| escape_backslash | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||