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);
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 basic action. It doesn't disclose critical behavioral traits such as whether this operation is reversible, requires specific permissions, affects VM availability, or has side effects like data loss—essential for a destructive-seeming operation.

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 zero wasted words. It's front-loaded with the core action and resource, making it immediately understandable without unnecessary elaboration.

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 tool that appears to perform a potentially destructive operation (detaching a volume) with no annotations and no output schema, the description is inadequate. It lacks information on consequences, success indicators, error conditions, or relation to sibling tools, leaving significant gaps in understanding.

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 the parameter 'id' is documented in the schema as 'Volume ID'. The description adds no additional meaning about this parameter, such as format examples or where to find the ID, meeting the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('detach') and target resource ('volume from virtual machine'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'attach_volume' beyond the obvious directionality, missing explicit contrast in scope or effects.

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 or prerequisites. While the name implies it's the inverse of 'attach_volume', the description doesn't mention this relationship, leaving usage context entirely implicit.

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