Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

start_virtual_machine

Use this tool to initiate the startup of a virtual machine by specifying its unique VM ID, enabling resource activation within the CloudStack MCP Server environment.

Instructions

Start a virtual machine

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesVM ID to start

Implementation Reference

  • The main handler function that executes the start_virtual_machine tool logic. It calls the CloudStack client to start the VM and returns a formatted response with the job ID.
    async handleStartVirtualMachine(args: any) {
      const result = await this.cloudStackClient.startVirtualMachine({ id: args.id });
      
      return {
        content: [
          {
            type: 'text',
            text: `Started virtual machine ${args.id}. Job ID: ${result.startvirtualmachineresponse?.jobid}`
          }
        ]
      };
    }
  • The tool definition including name, description, and input schema that requires a 'id' parameter.
    {
      name: 'start_virtual_machine',
      description: 'Start a virtual machine',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: 'VM ID to start',
          },
        },
        required: ['id'],
        additionalProperties: false,
      },
    },
  • src/server.ts:112-113 (registration)
    Tool registration in the MCP server's CallToolRequest handler switch statement, which dispatches to the VirtualMachineHandlers.handleStartVirtualMachine method.
    case 'start_virtual_machine':
      return await this.vmHandlers.handleStartVirtualMachine(args);
  • Helper method in CloudStackClient that performs the actual API request to CloudStack's startVirtualMachine endpoint.
    async startVirtualMachine(params: CloudStackParams): Promise<CloudStackResponse> {
      return this.request('startVirtualMachine', 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