Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

list_zones

Retrieve availability zones within CloudStack MCP Server to manage cloud resources effectively; filter results to display only currently available zones.

Instructions

List availability zones

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
availableNoShow only available zones

Implementation Reference

  • The main handler function for the 'list_zones' tool. It calls the CloudStack API via cloudStackClient.listZones, processes the response to extract zone details, formats them into a structured text response for MCP, and returns it in the expected content format.
    async handleListZones(args: any) {
      const result = await this.cloudStackClient.listZones(args);
      const zones = result.listzonesresponse?.zone || [];
      
      const zoneList = zones.map((zone: any) => ({
        id: zone.id,
        name: zone.name,
        description: zone.description,
        allocationstate: zone.allocationstate,
        networktype: zone.networktype,
        localstorageenabled: zone.localstorageenabled,
        securitygroupsenabled: zone.securitygroupsenabled
      }));
    
      return {
        content: [
          {
            type: 'text',
            text: `Found ${zoneList.length} zones:\n\n${zoneList
              .map((zone: any) => 
                `• ${zone.name} (${zone.id})\n  Description: ${zone.description}\n  Allocation State: ${zone.allocationstate}\n  Network Type: ${zone.networktype}\n  Local Storage: ${zone.localstorageenabled}\n  Security Groups: ${zone.securitygroupsenabled}\n`
              )
              .join('\n')}`
          }
        ]
      };
    }
  • The tool schema definition for 'list_zones', including name, description, and input schema specifying an optional 'available' boolean parameter.
    {
      name: 'list_zones',
      description: 'List availability zones',
      inputSchema: {
        type: 'object',
        properties: {
          available: {
            type: 'boolean',
            description: 'Show only available zones',
            default: true,
          },
        },
        additionalProperties: false,
      },
    },
  • src/server.ts:178-179 (registration)
    Registration/dispatch in the MCP server: in the CallToolRequestSchema handler, matches tool name 'list_zones' and delegates to adminHandlers.handleListZones.
    case 'list_zones':
      return await this.adminHandlers.handleListZones(args);
  • Helper method in CloudStackClient that makes the underlying 'listZones' API request to the CloudStack server.
    async listZones(params: CloudStackParams = {}): Promise<CloudStackResponse> {
      return this.request('listZones', 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 for behavioral disclosure. 'List' implies a read-only operation, but it doesn't specify whether this requires authentication, has rate limits, returns paginated results, or what format the output takes. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 perfectly concise at just three words, front-loading the essential information with zero wasted words. Every element ('List', 'availability', 'zones') earns its place by contributing directly to understanding the tool's purpose.

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 lack of annotations and output schema, the description should do more to compensate. As a read operation in a complex cloud management context with many sibling tools, it should explain what availability zones are, typical use cases, and what information the listing provides. The current description is too minimal for adequate contextual 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?

The input schema has 100% description coverage, with the single parameter 'available' clearly documented as 'Show only available zones'. The description doesn't add any additional parameter information beyond what the schema provides, which is acceptable given the high schema coverage, resulting in the baseline score of 3.

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 availability zones' clearly states the verb ('List') and resource ('availability zones'), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'list_accounts', 'list_clusters', or 'list_domains' which follow the same 'list_[resource]' pattern, so it doesn't achieve full sibling differentiation.

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. It doesn't mention prerequisites, context (e.g., for deployment planning), or how it relates to sibling tools like 'list_capacity' or 'list_hosts' that might provide overlapping information about infrastructure resources.

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