Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

resize_volume

Increase or decrease the size of a volume in CloudStack MCP Server by specifying the Volume ID and desired size in GB. Optionally allow shrinking for reduced storage needs.

Instructions

Resize a volume

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesVolume ID
shrinkokNoAllow shrinking
sizeYesNew size in GB

Implementation Reference

  • The main handler function that executes the resize_volume tool by calling the CloudStack client and formatting the response.
    async handleResizeVolume(args: any) {
      const result = await this.cloudStackClient.resizeVolume(args);
      
      return {
        content: [
          {
            type: 'text',
            text: `Resized volume ${args.id}. Job ID: ${result.resizevolumeresponse?.jobid}`
          }
        ]
      };
    }
  • Defines the tool metadata including name, description, and input schema for resize_volume.
    {
      name: 'resize_volume',
      description: 'Resize a volume',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: 'Volume ID',
          },
          size: {
            type: 'number',
            description: 'New size in GB',
          },
          shrinkok: {
            type: 'boolean',
            description: 'Allow shrinking',
            default: false,
          },
        },
        required: ['id', 'size'],
        additionalProperties: false,
      },
    },
  • src/server.ts:142-143 (registration)
    Registers the resize_volume tool in the MCP server by dispatching tool calls to the storage handler.
    case 'resize_volume':
      return await this.storageHandlers.handleResizeVolume(args);
  • Low-level wrapper method that sends the resizeVolume command to the CloudStack API.
    async resizeVolume(params: CloudStackParams): Promise<CloudStackResponse> {
      return this.request('resizeVolume', 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