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);

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