Apply workspace file patch (approval required)
filesystem.apply_patchCreate a pending approval request for a narrowly scoped file patch. The patch changes only the specified file and applies after out-of-band approval.
Instructions
Create a PENDING approval request for a narrowly-scoped patch.
The patch may modify only the requested file, and is applied only after out-of-band approval via filesystem.apply_patch_approved.
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": {
"path": "<path>",
"patch": "<patch>"
},
"name": "filesystem.apply_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| patch | Yes | ||
| expected_hash | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| error | No | ||
| changed | No | ||
| message | No | ||
| outcome | Yes | ||
| approval | No | ||
| executed | Yes | ||
| new_hash | No | ||
| trace_id | Yes | ||
| additions | No | ||
| deletions | No | ||
| request_id | No | ||
| bytes_after | No | ||
| bytes_before | No | ||
| previous_hash | No | ||
| approval_status | No |