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);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states the action is a 'change' (implying mutation) but doesn't disclose whether this requires specific permissions, if the VM needs to be in a particular state, potential downtime, side effects, or response format. For a mutation tool with zero annotation coverage, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized for a simple tool and front-loads the core purpose immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with no annotations, no output schema, and 2 parameters, the description is incomplete. It lacks critical context about behavioral traits (e.g., VM state requirements, side effects), usage guidelines compared to siblings, and what constitutes a service offering. The 100% schema coverage helps with parameters but doesn't compensate for other gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters ('id' as VM ID, 'serviceofferingid' as new service offering ID) clearly documented in the schema. The description adds no additional parameter context beyond what's in the schema, so it meets the baseline of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('change service offering') and target resource ('for virtual machine'), making the purpose understandable. It doesn't distinguish from siblings like 'scale_virtual_machine' or 'migrate_virtual_machine' which might have overlapping functionality, but the verb+resource combination is specific enough for basic understanding.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives. There's no mention of prerequisites (e.g., VM must be stopped), comparison to similar tools like 'scale_virtual_machine', or context about what service offerings represent. The agent must infer usage from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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