Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

list_system_vms

Retrieve and filter system VMs (console proxy, secondary storage) by zone, type, and state in CloudStack infrastructure for streamlined management.

Instructions

List system VMs (console proxy, secondary storage)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateNoSystem VM state
systemvmtypeNoSystem VM type (consoleproxy, secondarystoragevm)
zoneidNoZone ID to filter system VMs

Implementation Reference

  • The handler function that executes the tool logic: calls CloudStack client to list system VMs, processes the response, and formats it as MCP content.
    async handleListSystemVms(args: any) { const result = await this.cloudStackClient.listSystemVms(args); const systemVms = result.listsystemvmsresponse?.systemvm || []; const systemVmList = systemVms.map((vm: any) => ({ id: vm.id, name: vm.name, systemvmtype: vm.systemvmtype, state: vm.state, zonename: vm.zonename, hostid: vm.hostid, hostname: vm.hostname, publicip: vm.publicip, privateip: vm.privateip, linklocalip: vm.linklocalip })); return { content: [ { type: 'text', text: `Found ${systemVmList.length} system VMs:\n\n${systemVmList .map((vm: any) => `• ${vm.name} (${vm.id})\n Type: ${vm.systemvmtype}\n State: ${vm.state}\n Zone: ${vm.zonename}\n Host: ${vm.hostname}\n Public IP: ${vm.publicip}\n Private IP: ${vm.privateip}\n Link Local IP: ${vm.linklocalip}\n` ) .join('\n')}` } ] }; }
  • Tool definition including name, description, and input schema for validation.
    { name: 'list_system_vms', description: 'List system VMs (console proxy, secondary storage)', inputSchema: { type: 'object', properties: { zoneid: { type: 'string', description: 'Zone ID to filter system VMs', }, systemvmtype: { type: 'string', description: 'System VM type (consoleproxy, secondarystoragevm)', }, state: { type: 'string', description: 'System VM state', }, }, additionalProperties: false, }, },
  • src/server.ts:194-195 (registration)
    Dispatch/registration of the list_system_vms tool call to the admin handler in the MCP server switch statement.
    case 'list_system_vms': return await this.adminHandlers.handleListSystemVms(args);
  • CloudStack client wrapper method that performs the actual API request to listSystemVms.
    async listSystemVms(params: CloudStackParams = {}): Promise<CloudStackResponse> { return this.request('listSystemVms', params); }

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/phantosmax/cloudstack-mcp-server'

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