Skip to main content
Glama
dvvincent

VergeOS MCP Server

by dvvincent

get_vm

Retrieve detailed information about a specific virtual machine using its ID to manage and monitor virtualization platforms.

Instructions

Get detailed information about a specific VM by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesVM ID

Implementation Reference

  • The core handler function for the 'get_vm' tool. It retrieves detailed VM information by proxying to the VergeOS API endpoint `/api/v4/vms/${id}?fields=most` using the shared request method.
    async getVM(id) {
      return this.request(`/api/v4/vms/${id}?fields=most`);
    }
  • The input schema definition for the 'get_vm' tool, specifying that a numeric 'id' parameter is required.
    {
      name: "get_vm",
      description: "Get detailed information about a specific VM by ID",
      inputSchema: {
        type: "object",
        properties: {
          id: {
            type: "number",
            description: "VM ID",
          },
        },
        required: ["id"],
      },
    },
  • src/index.js:542-544 (registration)
    The registration/dispatch logic in the tool call handler switch statement that routes 'get_vm' calls to the api.getVM method.
    case "get_vm":
      result = await api.getVM(args.id);
      break;
  • src/index.js:526-528 (registration)
    Registers the list_tools handler which returns the TOOLS array containing the 'get_vm' tool definition.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools: TOOLS };
    });
  • Alternative direct-mode handler for 'get_vm' that fetches VM details and enriches with status information, formatting a structured response.
    async function getVM(id) {
      const vm = await apiRequest(`/api/v4/vms/${id}?fields=most`);
      const statuses = await apiRequest("/api/v4/machine_status");
      const status = statuses.find(s => s.machine === vm.machine) || {};
      
      return {
        id: vm.$key,
        name: vm.name,
        machine: vm.machine,
        enabled: vm.enabled,
        running: status.running || false,
        status: status.running ? "running" : "stopped",
        cpu_cores: vm.cpu_cores,
        ram: vm.ram,
        os_family: vm.os_family,
        description: vm.description || "",
      };
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dvvincent/vergeos-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server