Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

detach_volume

Detach a volume from a virtual machine in CloudStack MCP Server by specifying the Volume ID, enabling efficient storage management and resource optimization.

Instructions

Detach volume from virtual machine

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesVolume ID

Implementation Reference

  • Executes the detach_volume tool by invoking the CloudStack client's detachVolume method with the volume ID from arguments and returns a formatted text response containing the job ID.
    async handleDetachVolume(args: any) { const result = await this.cloudStackClient.detachVolume({ id: args.id }); return { content: [ { type: 'text', text: `Detached volume ${args.id}. Job ID: ${result.detachvolumeresponse?.jobid}` } ] }; }
  • Defines the input schema for the detach_volume tool, requiring a 'id' string parameter for the volume ID.
    { name: 'detach_volume', description: 'Detach volume from virtual machine', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Volume ID', }, }, required: ['id'], additionalProperties: false, }, },
  • src/server.ts:140-141 (registration)
    Registers the detach_volume tool in the MCP server by routing calls to the storageHandlers.handleDetachVolume method in the CallToolRequest handler.
    case 'detach_volume': return await this.storageHandlers.handleDetachVolume(args);
  • Helper method in CloudStackClient that performs the actual API request to the CloudStack detachVolume endpoint.
    async detachVolume(params: CloudStackParams): Promise<CloudStackResponse> { return this.request('detachVolume', 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