run_command
Execute commands inside a running Proxmox VM through the QEMU guest agent and return the output, with optional user and stdin support.
Instructions
Run a program inside a running VM through the QEMU guest agent and get its output (for example ["systemctl", "status", "nginx"], or ["sh", "-c", "df -h"]). It runs as root (SYSTEM on Windows) unless user is given.
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": {
"host": "<host>",
"vmid": "<vmid>",
"command": "<command>",
"reason": "<reason>"
},
"name": "run_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | The host's id, from list_hosts. | |
| user | No | Linux guests: run it as this user of the VM, from their home folder with their HOME — so what it makes is theirs, not root's. | |
| vmid | Yes | The guest's ID (VMID). | |
| input | No | Text given to the program's standard input. | |
| reason | Yes | Why you are doing this, in a sentence. The user sees it in the approval window and in the log. | |
| command | Yes | ||
| timeout_s | No |