Replace in files
replace_in_filesUse this when the same text or regular-expression replacement should be searched and applied across multiple files under a path, such as a rename or version bump. For one known block use edit_block; for one complete known file use write_file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of a file or directory to search. | |
| regex | No | Treat pattern as a regular expression. Default false (plain text). | |
| device | Yes | ReMCP device id returned by list_devices. Required for every device operation. | |
| dry_run | No | Only report the files that would change. Default false. | |
| pattern | Yes | Text or regular expression to find. | |
| maxFiles | No | Stop after this many changed files. Default 100, maximum 500. | |
| filePattern | No | Optional glob limiting which file names are changed, such as "*.ts". | |
| replacement | Yes | Replacement text. In regex mode, $1 and friends refer to capture groups. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Optional structured result data for follow-up reasoning and tool calls. | |
| text | Yes | Concise human-readable result of the tool call. |