apply_fix
Apply a patch to a deployed app and restart its systemd unit. M1 is
local-vm only: writes the file via the guest agent, then systemctl restart of-app-<slug>. github-pr / provider-redeploy modes return 501
until M2.5 / M3.
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": {
"intent_id": "<intent_id>",
"patch": "<patch>",
"target_file": "<target_file>",
"vm_name": "<vm_name>"
},
"name": "apply_fix"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patch | Yes | The FULL new file content (NOT a unified diff in M1). | |
| api_key | No | MCP API key | |
| vm_name | Yes | Tester VM name from the App entity. Required in M1. | |
| intent_id | Yes | FixIntent id from propose_fix. | |
| target_file | Yes | Relative path under /opt/of-apps/<slug>/ (or absolute). | |
| session_token | No | Session token |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||