Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

create_volume

Generate a new storage volume in CloudStack MCP Server by specifying essential parameters like name, disk offering ID, zone ID, and optional custom size, enabling efficient resource allocation for cloud infrastructure.

Instructions

Create a new volume

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
diskofferingidYesDisk offering ID
nameYesVolume name
sizeNoVolume size in GB (for custom disk offerings)
zoneidYesZone ID

Implementation Reference

  • The main handler function for the 'create_volume' tool. It calls the CloudStack client's createVolume method with the provided arguments and returns a formatted response with the job ID and volume ID.
    async handleCreateVolume(args: any) {
      const result = await this.cloudStackClient.createVolume(args);
      
      return {
        content: [
          {
            type: 'text',
            text: `Created volume. Job ID: ${result.createvolumeresponse?.jobid}\nVolume ID: ${result.createvolumeresponse?.id}`
          }
        ]
      };
    }
  • Defines the tool metadata including name, description, and input schema (parameters: name, diskofferingid, zoneid required; size optional).
    {
      name: 'create_volume',
      description: 'Create a new volume',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: 'Volume name',
          },
          diskofferingid: {
            type: 'string',
            description: 'Disk offering ID',
          },
          zoneid: {
            type: 'string',
            description: 'Zone ID',
          },
          size: {
            type: 'number',
            description: 'Volume size in GB (for custom disk offerings)',
          },
        },
        required: ['name', 'diskofferingid', 'zoneid'],
        additionalProperties: false,
      },
    },
  • src/server.ts:136-137 (registration)
    Registers the 'create_volume' tool in the MCP server's CallToolRequestHandler by dispatching to the StorageHandlers.handleCreateVolume method.
    case 'create_volume':
      return await this.storageHandlers.handleCreateVolume(args);
  • Helper method in CloudStackClient that makes the actual 'createVolume' API request to the CloudStack server, invoked by the tool handler.
    async createVolume(params: CloudStackParams): Promise<CloudStackResponse> {
      return this.request('createVolume', params);
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Create a new volume' implies a write operation, but it does not disclose critical traits such as required permissions, whether the creation is asynchronous, potential costs or resource limits, or what happens on failure (e.g., error handling). This leaves significant gaps for an AI agent to understand the tool's behavior.

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

Conciseness4/5

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

The description is extremely concise with just three words, making it front-loaded and easy to parse. However, it may be overly terse, as it lacks necessary context that could be added without sacrificing brevity. Every word earns its place, but more information could enhance usability without becoming verbose.

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 the complexity of a creation tool with no annotations and no output schema, the description is incomplete. It does not cover behavioral aspects (e.g., permissions, async nature), usage guidelines, or what to expect upon success/failure. For a tool that likely involves resource allocation and mutation, this minimal description is insufficient for an AI agent to use it effectively.

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 clear descriptions for each parameter (e.g., 'Disk offering ID', 'Volume size in GB'). The description adds no additional meaning beyond the schema, such as explaining parameter interactions (e.g., 'size' is only for custom disk offerings) or constraints. Since the schema is well-documented, a baseline score of 3 is appropriate, but no extra value is provided.

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 'Create a new volume' clearly states the action (create) and resource (volume), making the purpose understandable. However, it lacks specificity about what a 'volume' entails in this context (e.g., storage volume, data volume) and does not differentiate from sibling tools like 'attach_volume' or 'resize_volume', which are related but distinct operations.

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 does not mention prerequisites (e.g., needing a disk offering or zone), when to use 'create_volume' vs. 'attach_volume' (for existing volumes), or 'resize_volume' (for modifying size). The description only states the action without context or exclusions.

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