Execute command in container (SSH + pct exec)
execute_container_commandExecute shell commands inside Proxmox LXC containers by specifying node, container ID, and command input. Enables remote administration and automation without manual SSH.
Instructions
Run a shell command inside an LXC container by shelling out to pct exec <vmid> -- <cmd> on the host. Requires SSH access (PROXMOX_SSH_* env).
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": {
"node": "<node>",
"vmid": "<vmid>",
"command": "<command>"
},
"name": "execute_container_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node | Yes | Host node that owns the container | |
| vmid | Yes | Container ID | |
| command | Yes | Shell command to run inside the container | |
| timeout_seconds | No | Client timeout |