Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

attach_volume

Link a storage volume to a virtual machine using Volume ID and VM ID on the CloudStack MCP Server, enabling efficient resource management and storage allocation.

Instructions

Attach volume to virtual machine

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceidNoDevice ID
idYesVolume ID
virtualmachineidYesVM ID to attach to

Implementation Reference

  • The handler function that executes the attach_volume tool logic by calling the CloudStack client to attach the volume and returning a formatted success message.
    async handleAttachVolume(args: any) { const result = await this.cloudStackClient.attachVolume(args); return { content: [ { type: 'text', text: `Attached volume ${args.id} to VM ${args.virtualmachineid}. Job ID: ${result.attachvolumeresponse?.jobid}` } ] }; }
  • Defines the tool name, description, and input schema (parameters with types and requirements) for attach_volume.
    { name: 'attach_volume', description: 'Attach volume to virtual machine', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Volume ID', }, virtualmachineid: { type: 'string', description: 'VM ID to attach to', }, deviceid: { type: 'number', description: 'Device ID', }, }, required: ['id', 'virtualmachineid'], additionalProperties: false, }, },
  • src/server.ts:138-139 (registration)
    Registers and dispatches the attach_volume tool call to the corresponding storage handler method.
    case 'attach_volume': return await this.storageHandlers.handleAttachVolume(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