Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

list_snapshots

Retrieve and filter volume snapshots by volume ID and interval type (e.g., MANUAL, HOURLY, DAILY) for effective snapshot management on CloudStack MCP Server.

Instructions

List volume snapshots

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
intervaltypeNoInterval type (MANUAL, HOURLY, DAILY, WEEKLY, MONTHLY)
volumeidNoVolume ID to filter snapshots

Implementation Reference

  • The handler function that implements the core logic for the 'list_snapshots' tool. It calls the CloudStack client to list snapshots, processes the response, and formats it as a text response.
    async handleListSnapshots(args: any) {
      const result = await this.cloudStackClient.listSnapshots(args);
      const snapshots = result.listsnapshotsresponse?.snapshot || [];
      
      const snapshotList = snapshots.map((snapshot: any) => ({
        id: snapshot.id,
        name: snapshot.name,
        state: snapshot.state,
        volumeid: snapshot.volumeid,
        intervaltype: snapshot.intervaltype,
        created: snapshot.created,
        snapshottype: snapshot.snapshottype
      }));
    
      return {
        content: [
          {
            type: 'text',
            text: `Found ${snapshotList.length} snapshots:\n\n${snapshotList
              .map((snap: any) => 
                `• ${snap.name} (${snap.id})\n  State: ${snap.state}\n  Volume ID: ${snap.volumeid}\n  Type: ${snap.snapshottype}\n  Interval: ${snap.intervaltype}\n  Created: ${snap.created}\n`
              )
              .join('\n')}`
          }
        ]
      };
    }
  • The tool definition including name, description, and input schema for 'list_snapshots'.
    {
      name: 'list_snapshots',
      description: 'List volume snapshots',
      inputSchema: {
        type: 'object',
        properties: {
          volumeid: {
            type: 'string',
            description: 'Volume ID to filter snapshots',
          },
          intervaltype: {
            type: 'string',
            description: 'Interval type (MANUAL, HOURLY, DAILY, WEEKLY, MONTHLY)',
          },
        },
        additionalProperties: false,
      },
    },
  • src/server.ts:146-147 (registration)
    Dispatch/registration in the MCP server switch statement that routes 'list_snapshots' calls to the storage handler.
    case 'list_snapshots':
      return await this.storageHandlers.handleListSnapshots(args);
  • Supporting CloudStack client method that performs the actual API request to list snapshots.
    async listSnapshots(params: CloudStackParams = {}): Promise<CloudStackResponse> {
      return this.request('listSnapshots', 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 action without behavioral details. It doesn't disclose whether this is a read-only operation, if it requires authentication, what the output format looks like (e.g., list structure, pagination), or any rate limits—critical gaps for a tool with potential data access.

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—'List volume snapshots' directly conveys the core action and resource. It's appropriately sized and front-loaded, 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 (a list operation with filtering parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain return values, error conditions, or behavioral traits, leaving significant gaps for the agent to operate effectively in this context.

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 schema fully documents both parameters (intervaltype, volumeid) with descriptions. The tool description adds no additional parameter semantics beyond what's in the schema, meeting the baseline for high coverage but not enhancing understanding.

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 verb ('List') and resource ('volume snapshots'), making the purpose immediately understandable. However, it doesn't distinguish this tool from other list_* siblings (like list_volumes, list_virtual_machines) beyond the specific resource type, missing explicit differentiation about scope or relationship to create_snapshot.

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. It doesn't mention prerequisites (e.g., needing volume access), exclusions, or how it relates to sibling tools like create_snapshot or list_volumes, leaving the agent to infer usage context.

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