Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

change_service_offering_virtual_machine

Modify the service offering for a virtual machine in CloudStack by specifying the VM ID and new service offering ID.

Instructions

Change service offering for virtual machine

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesVM ID
serviceofferingidYesNew service offering ID

Implementation Reference

  • The main handler function that implements the tool logic by calling the CloudStack API to change the service offering for the specified virtual machine.
    async handleChangeServiceOfferingVirtualMachine(args: any) { const result = await this.cloudStackClient.changeServiceForVirtualMachine({ id: args.id, serviceofferingid: args.serviceofferingid }); return { content: [ { type: 'text', text: `Changed service offering for virtual machine ${args.id}. Job ID: ${result.changeserviceforvirtualmachineresponse?.jobid}` } ] }; }
  • Tool definition with input schema for validating the required parameters: VM ID and new service offering ID.
    { name: 'change_service_offering_virtual_machine', description: 'Change service offering for virtual machine', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'VM ID', }, serviceofferingid: { type: 'string', description: 'New service offering ID', }, }, required: ['id', 'serviceofferingid'], additionalProperties: false, }, },
  • src/server.ts:128-129 (registration)
    Switch case in the tool dispatch handler that routes calls to this tool to the VirtualMachineHandlers instance.
    case 'change_service_offering_virtual_machine': return await this.vmHandlers.handleChangeServiceOfferingVirtualMachine(args);

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