Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

list_public_ip_addresses

Retrieve and filter public IP addresses in CloudStack zones using zone ID, allocation status, and static NAT configuration for efficient network management.

Instructions

List public IP addresses

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allocatedonlyNoShow only allocated IPs
isstaticnatNoFilter by static NAT enabled
zoneidNoZone ID to filter IPs

Implementation Reference

  • Executes the list_public_ip_addresses tool by calling CloudStack API via client, processes the response, and returns formatted list of public IP addresses.
    async handleListPublicIpAddresses(args: any) {
      const result = await this.cloudStackClient.listPublicIpAddresses(args);
      const ips = result.listpublicipaddressesresponse?.publicipaddress || [];
      
      const ipList = ips.map((ip: any) => ({
        id: ip.id,
        ipaddress: ip.ipaddress,
        state: ip.state,
        zonename: ip.zonename,
        allocated: ip.allocated,
        issourcenat: ip.issourcenat,
        isstaticnat: ip.isstaticnat,
        virtualmachineid: ip.virtualmachineid,
        virtualmachinename: ip.virtualmachinename
      }));
    
      return {
        content: [
          {
            type: 'text',
            text: `Found ${ipList.length} public IP addresses:\n\n${ipList
              .map((ip: any) => 
                `• ${ip.ipaddress} (${ip.id})\n  State: ${ip.state}\n  Zone: ${ip.zonename}\n  Allocated: ${ip.allocated}\n  Source NAT: ${ip.issourcenat}\n  Static NAT: ${ip.isstaticnat}\n  VM: ${ip.virtualmachinename || 'Not assigned'}\n`
              )
              .join('\n')}`
          }
        ]
      };
    }
  • Defines the tool schema including name, description, and inputSchema for list_public_ip_addresses.
    {
      name: 'list_public_ip_addresses',
      description: 'List public IP addresses',
      inputSchema: {
        type: 'object',
        properties: {
          zoneid: {
            type: 'string',
            description: 'Zone ID to filter IPs',
          },
          allocatedonly: {
            type: 'boolean',
            description: 'Show only allocated IPs',
            default: true,
          },
          isstaticnat: {
            type: 'boolean',
            description: 'Filter by static NAT enabled',
          },
        },
        additionalProperties: false,
      },
    },
  • src/server.ts:154-155 (registration)
    Registers the tool handler in the MCP server switch statement, routing calls to NetworkHandlers.handleListPublicIpAddresses.
    case 'list_public_ip_addresses':
      return await this.networkHandlers.handleListPublicIpAddresses(args);
  • CloudStackClient method that makes the underlying API request for listPublicIpAddresses.
    async listPublicIpAddresses(params: CloudStackParams = {}): Promise<CloudStackResponse> {
      return this.request('listPublicIpAddresses', 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 public IP addresses' implies a read-only operation, but it doesn't specify whether this requires authentication, returns paginated results, includes metadata, or has rate limits. For a tool with zero annotation coverage, this leaves significant behavioral gaps, though it doesn't contradict any annotations.

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 core action and resource. There's no wasted language or redundancy, making it easy to parse quickly. However, this conciseness comes at the cost of completeness, as noted in other dimensions.

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 tool's moderate complexity (3 parameters, no output schema, no annotations), the description is incomplete. It lacks details on behavioral traits, usage context, and output format, which are crucial for an AI agent to invoke it correctly. Without annotations or an output schema, the description should provide more context to compensate, but it doesn't.

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 all three parameters (allocatedonly, isstaticnat, zoneid). The description adds no parameter information beyond what's in the schema, so it doesn't enhance semantics. According to the rules, when schema coverage is high (>80%), the baseline score is 3 even without param details in the description.

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

Purpose3/5

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

The description 'List public IP addresses' clearly states the verb ('List') and resource ('public IP addresses'), making the basic purpose understandable. However, it lacks specificity about scope or format, and doesn't differentiate from sibling tools like 'associate_ip_address' or 'enable_static_nat' that also involve IP addresses. The purpose is stated but remains vague about what exactly gets listed.

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 monitoring, allocation checks), or comparisons to sibling tools like 'list_networks' or 'list_virtual_machines' that might relate to IP addresses. Usage is implied only by the name, with no explicit when/when-not instructions.

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