Apply patch
apply_patchUse this when you already have a unified diff with one or more hunks and want to apply it to one or several files. Do not use write_file for the same patch-shaped change, and prefer edit_block when the change is one exact text block rather than a diff.
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": {
"patch": "<patch>",
"device": "<device>"
},
"name": "apply_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Apply every hunk to this file, ignoring the patch headers. | |
| patch | Yes | Unified diff, including ---/+++ headers and @@ hunks. | |
| device | Yes | ReMCP device id returned by list_devices. Required for every device operation. | |
| dry_run | No | Report the diff without writing. Default false. |
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. |