tenant_action
Control tenant power states in VergeOS by performing actions like power on, power off, reset, or isolation toggles using tenant ID.
Instructions
Perform an action on a tenant (poweron, poweroff, reset)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Tenant ID | |
| action | Yes | Action to perform |
Implementation Reference
- src/index.js:163-169 (handler)Core handler function in VergeOSAPI class that executes the tenant_action by proxying a POST request to the /api/v4/tenant_actions endpoint with the tenant ID and action payload.async tenantAction(id, action) { return this.request("/api/v4/tenant_actions", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ tenant: id, action }), }); }
- src/index.js:431-449 (registration)Tool registration in the TOOLS array, defining the name, description, and input schema for tenant_action, used in list_tools response.{ name: "tenant_action", description: "Perform an action on a tenant (poweron, poweroff, reset)", inputSchema: { type: "object", properties: { id: { type: "number", description: "Tenant ID", }, action: { type: "string", enum: ["poweron", "poweroff", "reset", "isolateon", "isolateoff"], description: "Action to perform", }, }, required: ["id", "action"], }, },
- src/index.js:582-584 (handler)Dispatch handler in the MCP call_tool request handler that invokes the tenantAction method with parsed arguments.case "tenant_action": result = await api.tenantAction(args.id, args.action); break;
- src/index.js:582-584 (schema)The dispatch case in the tool execution switch statement.case "tenant_action": result = await api.tenantAction(args.id, args.action); break;