Skip to main content
Glama
phantosmax

CloudStack MCP Server

by phantosmax

list_storage_pools

Retrieve and filter storage pools in CloudStack MCP Server by specifying Zone ID or Cluster ID for efficient cloud resource management.

Instructions

List storage pools

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clusteridNoCluster ID to filter storage pools
zoneidNoZone ID to filter storage pools

Implementation Reference

  • The main handler function that executes the list_storage_pools tool logic. It fetches storage pools via CloudStack client, maps relevant fields, and returns a formatted text response listing pools with details like name, ID, type, state, zone, cluster, IP, path, and disk usage.
    async handleListStoragePools(args: any) { const result = await this.cloudStackClient.listStoragePools(args); const pools = result.liststoragepoolsresponse?.storagepool || []; const poolList = pools.map((pool: any) => ({ id: pool.id, name: pool.name, type: pool.type, state: pool.state, zonename: pool.zonename, clustername: pool.clustername, ipaddress: pool.ipaddress, path: pool.path, disksizeused: pool.disksizeused, disksizetotal: pool.disksizetotal })); return { content: [ { type: 'text', text: `Found ${poolList.length} storage pools:\n\n${poolList .map((pool: any) => `• ${pool.name} (${pool.id})\n Type: ${pool.type}\n State: ${pool.state}\n Zone: ${pool.zonename}\n Cluster: ${pool.clustername}\n IP: ${pool.ipaddress}\n Path: ${pool.path}\n Usage: ${pool.disksizeused}/${pool.disksizetotal} GB\n` ) .join('\n')}` } ] }; }
  • Tool schema definition specifying the name, description, and input schema allowing optional zoneid and clusterid filters.
    { name: 'list_storage_pools', description: 'List storage pools', inputSchema: { type: 'object', properties: { zoneid: { type: 'string', description: 'Zone ID to filter storage pools', }, clusterid: { type: 'string', description: 'Cluster ID to filter storage pools', }, }, additionalProperties: false, }, },
  • src/server.ts:192-193 (registration)
    Registration and dispatch logic in the MCP server that maps the tool name to the corresponding admin handler method.
    case 'list_storage_pools': return await this.adminHandlers.handleListStoragePools(args);
  • Supporting utility method in CloudStackClient that performs the actual API request to the 'listStoragePools' CloudStack endpoint.
    async listStoragePools(params: CloudStackParams = {}): Promise<CloudStackResponse> { return this.request('listStoragePools', 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