Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

reboot_virtual_machine

Restart a virtual machine on the CloudStack MCP Server by specifying its VM ID, ensuring operational stability and resource efficiency in cloud infrastructure management.

Instructions

Reboot a virtual machine

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesVM ID to reboot

Implementation Reference

  • The main handler function that calls the CloudStack client to reboot the VM and returns a formatted response with the job ID.
    async handleRebootVirtualMachine(args: any) { const result = await this.cloudStackClient.rebootVirtualMachine({ id: args.id }); return { content: [ { type: 'text', text: `Rebooted virtual machine ${args.id}. Job ID: ${result.rebootvirtualmachineresponse?.jobid}` } ] }; }
  • The tool definition including name, description, and input schema requiring a VM ID.
    { name: 'reboot_virtual_machine', description: 'Reboot a virtual machine', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'VM ID to reboot', }, }, required: ['id'], additionalProperties: false, }, }, {
  • src/server.ts:116-117 (registration)
    The switch case in the MCP server that registers and routes calls to the reboot handler.
    case 'reboot_virtual_machine': return await this.vmHandlers.handleRebootVirtualMachine(args);
  • The CloudStack client method that sends the actual API request to reboot the virtual machine.
    async rebootVirtualMachine(params: CloudStackParams): Promise<CloudStackResponse> { return this.request('rebootVirtualMachine', 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