Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

list_networks

Discover available networks in the CloudStack MCP Server by filtering based on zone, type, or default status. Manage and query network configurations efficiently.

Instructions

List networks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
isdefaultNoFilter by default networks
typeNoNetwork type (Isolated, Shared, L2)
zoneidNoZone ID to filter networks

Implementation Reference

  • The main handler function that executes the list_networks tool logic: calls CloudStack API, processes networks, formats output as MCP content.
    async handleListNetworks(args: any) {
      const result = await this.cloudStackClient.listNetworks(args);
      const networks = result.listnetworksresponse?.network || [];
      
      const networkList = networks.map((network: any) => ({
        id: network.id,
        name: network.name,
        displaytext: network.displaytext,
        type: network.type,
        state: network.state,
        zonename: network.zonename,
        cidr: network.cidr,
        gateway: network.gateway,
        netmask: network.netmask,
        vlan: network.vlan,
        broadcasturi: network.broadcasturi,
        traffictype: network.traffictype
      }));
    
      return {
        content: [
          {
            type: 'text',
            text: `Found ${networkList.length} networks:\n\n${networkList
              .map((net: any) => 
                `• ${net.name} (${net.id})\n  Display Text: ${net.displaytext}\n  Type: ${net.type}\n  State: ${net.state}\n  Zone: ${net.zonename}\n  CIDR: ${net.cidr}\n  Gateway: ${net.gateway}\n  Netmask: ${net.netmask}\n  VLAN: ${net.vlan || 'N/A'}\n`
              )
              .join('\n')}`
          }
        ]
      };
    }
  • Tool schema definition including name, description, and input schema for list_networks.
    {
      name: 'list_networks',
      description: 'List networks',
      inputSchema: {
        type: 'object',
        properties: {
          zoneid: {
            type: 'string',
            description: 'Zone ID to filter networks',
          },
          type: {
            type: 'string',
            description: 'Network type (Isolated, Shared, L2)',
          },
          isdefault: {
            type: 'boolean',
            description: 'Filter by default networks',
          },
        },
        additionalProperties: false,
      },
    },
  • src/server.ts:150-151 (registration)
    Registration and dispatch of the list_networks tool in the MCP server request handler switch statement.
    case 'list_networks':
      return await this.networkHandlers.handleListNetworks(args);
  • CloudStack client helper method that makes the API request for listing networks.
    async listNetworks(params: CloudStackParams = {}): Promise<CloudStackResponse> {
      return this.request('listNetworks', 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 but offers none. 'List networks' doesn't indicate whether this is a read-only operation, what permissions are required, whether results are paginated, or what format the output takes. For a tool with 3 parameters and no output schema, this leaves significant behavioral questions unanswered.

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 maximally concise with just two words. While this represents under-specification rather than ideal conciseness, according to the scoring framework, 'Process' received a 2 for being under-specified, while this is even more minimal. However, given the explicit scoring guidance that 'Process' got 2 for conciseness, this similarly minimal description should receive a comparable score for being appropriately sized but lacking substance.

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 listing tool with 3 parameters, no annotations, and no output schema, the description is severely incomplete. It doesn't explain what 'networks' means in this context, what information is returned, or how results are structured. The agent would need to guess about the tool's behavior and output format based solely on the parameter schema.

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 schema has 100% description coverage, providing clear documentation for all 3 parameters (isdefault, type, zoneid). The description adds no parameter information beyond what's already in the schema. According to scoring rules, with high schema coverage (>80%), the baseline is 3 even when the description provides no parameter details.

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

Purpose2/5

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

The description 'List networks' is a tautology that merely restates the tool name without adding any meaningful context. It doesn't specify what kind of networks, from what system, or what scope is involved. While it's clear this is a listing operation, it lacks the specificity needed to distinguish it from potential alternatives.

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. Given the sibling tools include 'create_network' and various other network-related operations, there's no indication whether this is for inventory, discovery, or configuration purposes. The agent must infer usage from context 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