reset_vm
Restart a virtual machine in VergeOS by specifying its ID to resolve issues or apply configuration changes.
Instructions
Reset/reboot a virtual machine
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | VM ID to reset |
Implementation Reference
- src/index.js:133-135 (handler)The core handler function for the 'reset_vm' tool. It invokes the generic vmAction method with the 'reset' action to perform the VM reset via the VergeOS API.async resetVM(id) { return this.vmAction(id, "reset"); }
- src/index.js:117-123 (helper)Supporting helper function that performs generic VM actions by sending a POST request to the VergeOS /api/v4/vm_actions endpoint.async vmAction(id, action) { return this.request("/api/v4/vm_actions", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ vm: id, action }), }); }
- src/index.js:321-334 (schema)Tool schema definition including name, description, and input schema requiring a numeric VM 'id'.{ name: "reset_vm", description: "Reset/reboot a virtual machine", inputSchema: { type: "object", properties: { id: { type: "number", description: "VM ID to reset", }, }, required: ["id"], }, },
- src/index.js:554-556 (registration)Registration and dispatch logic in the MCP tool call handler switch statement, routing 'reset_vm' calls to the resetVM handler.case "reset_vm": result = await api.resetVM(args.id); break;