Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

list_volumes

Retrieve and filter storage volumes in CloudStack MCP Server by VM ID, zone, or type (ROOT, DATADISK). Manage cloud resources efficiently with precise volume listing.

Instructions

List storage volumes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoVolume type (ROOT, DATADISK)
virtualmachineidNoVM ID to filter volumes
zoneidNoZone ID to filter volumes

Implementation Reference

  • The handler function that executes the list_volumes tool logic. It fetches volumes using CloudStackClient, processes the response into a structured list, and formats it as a MCP-compatible text content response.
    async handleListVolumes(args: any) {
      const result = await this.cloudStackClient.listVolumes(args);
      const volumes = result.listvolumesresponse?.volume || [];
      
      const volumeList = volumes.map((volume: any) => ({
        id: volume.id,
        name: volume.name,
        type: volume.type,
        size: volume.size,
        state: volume.state,
        zonename: volume.zonename,
        vmname: volume.vmname,
        deviceid: volume.deviceid,
        diskofferingname: volume.diskofferingname,
        created: volume.created,
        path: volume.path
      }));
    
      return {
        content: [
          {
            type: 'text',
            text: `Found ${volumeList.length} volumes:\n\n${volumeList
              .map((vol: any) => 
                `• ${vol.name} (${vol.id})\n  Type: ${vol.type}\n  Size: ${vol.size}GB\n  State: ${vol.state}\n  Zone: ${vol.zonename}\n  VM: ${vol.vmname || 'Not attached'}\n  Device ID: ${vol.deviceid || 'N/A'}\n  Disk Offering: ${vol.diskofferingname}\n  Created: ${vol.created}\n`
              )
              .join('\n')}`
          }
        ]
      };
    }
  • Tool definition including name, description, and input schema for the list_volumes tool.
      name: 'list_volumes',
      description: 'List storage volumes',
      inputSchema: {
        type: 'object',
        properties: {
          virtualmachineid: {
            type: 'string',
            description: 'VM ID to filter volumes',
          },
          zoneid: {
            type: 'string',
            description: 'Zone ID to filter volumes',
          },
          type: {
            type: 'string',
            description: 'Volume type (ROOT, DATADISK)',
          },
        },
        additionalProperties: false,
      },
    },
  • src/server.ts:134-135 (registration)
    Registration of the list_volumes tool in the MCP server's CallToolRequest handler switch statement, dispatching to the StorageHandlers.handleListVolumes method.
    case 'list_volumes':
      return await this.storageHandlers.handleListVolumes(args);
  • Helper method in CloudStackClient that performs the actual API request to list volumes.
    async listVolumes(params: CloudStackParams = {}): Promise<CloudStackResponse> {
      return this.request('listVolumes', 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. 'List storage volumes' implies a read-only operation, but it doesn't specify whether this requires authentication, returns paginated results, has rate limits, or what happens on errors. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 extremely concise with just three words, front-loading the essential information without any waste. It efficiently communicates the core purpose in a minimal format, making it easy for an agent to parse quickly.

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 list operation with three optional parameters and no annotations or output schema, the description is incomplete. It doesn't address key aspects like return format, pagination, error handling, or authentication requirements. For a tool that likely returns structured data, more context is needed to guide the agent 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?

The input schema has 100% description coverage, with clear documentation for each parameter (type, virtualmachineid, zoneid). The description adds no additional meaning beyond what the schema provides, such as explaining how filters combine or default behaviors. With high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.

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 'List storage volumes' clearly states the action (list) and resource (storage volumes), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'list_snapshots' or 'list_storage_pools' that might list related but different resources, so it doesn't reach the highest score.

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?

The description provides no guidance on when to use this tool versus alternatives. For example, it doesn't mention if this is the primary way to retrieve volume information or if other tools like 'list_snapshots' serve different purposes. Without any context or exclusions, the agent must infer usage from the tool name alone.

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