Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

deploy_virtual_machine

Create and configure a virtual machine using specified service offering, template, and zone IDs on the CloudStack MCP Server. Optionally, assign a name, networks, security groups, SSH key pairs, and user data.

Instructions

Deploy a new virtual machine

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
displaynameNoVM display name
keypairNoSSH key pair name
nameNoVM name
networkidsNoNetwork IDs (comma-separated)
securitygroupidsNoSecurity group IDs (comma-separated)
serviceofferingidYesService offering ID
templateidYesTemplate ID
userdataNoUser data (base64 encoded)
zoneidYesZone ID

Implementation Reference

  • The handler function that implements the core logic for the 'deploy_virtual_machine' tool. It calls the CloudStack client to deploy the VM and returns a formatted text response with job ID and VM ID.
    async handleDeployVirtualMachine(args: any) {
      const result = await this.cloudStackClient.deployVirtualMachine(args);
      
      return {
        content: [
          {
            type: 'text',
            text: `Deployed virtual machine. Job ID: ${result.deployvirtualmachineresponse?.jobid}\nVM ID: ${result.deployvirtualmachineresponse?.id}`
          }
        ]
      };
    }
  • The tool definition including name, description, and input schema (parameters with types, descriptions, and required fields) for 'deploy_virtual_machine'.
    {
      name: 'deploy_virtual_machine',
      description: 'Deploy a new virtual machine',
      inputSchema: {
        type: 'object',
        properties: {
          serviceofferingid: {
            type: 'string',
            description: 'Service offering ID',
          },
          templateid: {
            type: 'string',
            description: 'Template ID',
          },
          zoneid: {
            type: 'string',
            description: 'Zone ID',
          },
          name: {
            type: 'string',
            description: 'VM name',
          },
          displayname: {
            type: 'string',
            description: 'VM display name',
          },
          networkids: {
            type: 'string',
            description: 'Network IDs (comma-separated)',
          },
          securitygroupids: {
            type: 'string',
            description: 'Security group IDs (comma-separated)',
          },
          keypair: {
            type: 'string',
            description: 'SSH key pair name',
          },
          userdata: {
            type: 'string',
            description: 'User data (base64 encoded)',
          },
        },
        required: ['serviceofferingid', 'templateid', 'zoneid'],
        additionalProperties: false,
      },
    },
  • src/server.ts:120-121 (registration)
    The switch case in the MCP server request handler that registers and routes calls to the 'deploy_virtual_machine' tool to its handler.
    case 'deploy_virtual_machine':
      return await this.vmHandlers.handleDeployVirtualMachine(args);
  • Helper method in the CloudStackClient class that wraps the API request for the 'deployVirtualMachine' CloudStack API command.
    async deployVirtualMachine(params: CloudStackParams): Promise<CloudStackResponse> {
      return this.request('deployVirtualMachine', params);
    }
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 only states the action without behavioral details. It doesn't disclose that this is a destructive/write operation, potential costs, time requirements, authentication needs, or what happens on failure. For a complex deployment tool, this leaves critical behavioral traits unspecified.

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 no wasted words. It's front-loaded with the core action and resource. While it lacks detail, what's present is structurally sound and appropriately concise for a tool name that clearly indicates the function.

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?

For a complex deployment tool with 9 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what 'deploy' means operationally, what happens after deployment, error conditions, or return values. The context demands more guidance about this significant infrastructure operation.

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%, so parameters are well-documented in the schema. The description adds no parameter-specific information beyond implying deployment involves some configuration. It doesn't explain relationships between parameters or provide usage examples, but the schema provides adequate baseline documentation.

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

Purpose3/5

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

The description 'Deploy a new virtual machine' clearly states the action (deploy) and resource (virtual machine), but it's vague about scope and doesn't distinguish from siblings like 'create_volume' or 'create_network'. It specifies 'new' which helps differentiate from mutation tools like 'change_service_offering_virtual_machine', but lacks detail on what deployment entails.

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 on when to use this tool versus alternatives. For example, it doesn't mention prerequisites like needing a template or service offering, or when to use 'deploy_virtual_machine' versus 'scale_virtual_machine' or 'migrate_virtual_machine'. The description offers no context for tool selection.

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