list_storage_containers
List storage containers across clusters, returning names, capacity, usage, and associated cluster. Filter by cluster UUID.
Instructions
List storage containers available across clusters. Returns names, capacity, usage, and associated cluster.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cluster_uuid | No | Filter to a specific cluster UUID | |
| limit | No | Maximum number of results. Omit to retrieve all (auto-paginates). |
Implementation Reference
- src/nutanix_mcp/tools/cluster.py:212-248 (handler)The handler function that executes the list_storage_containers tool logic. Calls v4 clustermgmt API to list storage containers, optionally filtered by cluster UUID. Returns name, extId, capacity, replication factor, compression, encryption, and cluster info.
async def handle_list_storage_containers( client: NutanixClient, arguments: dict[str, Any] ) -> dict[str, Any]: """List storage containers using v4 clustermgmt API.""" cluster_uuid = arguments.get("cluster_uuid") limit = arguments.get("limit") if cluster_uuid: path = f"config/clusters/{cluster_uuid}/storage-containers" else: path = "config/storage-containers" result = await client.v4_list_all( namespace="clustermgmt", path=path, max_results=limit, ) containers = result.get("data", []) metadata = result.get("metadata", {}) return { "count": len(containers), "truncated": metadata.get("truncated", False), "storageContainers": [ { "name": sc.get("name"), "extId": sc.get("containerExtId"), "maxCapacityBytes": sc.get("maxCapacityBytes"), "replicationFactor": sc.get("replicationFactor"), "compressionEnabled": sc.get("isCompressionEnabled"), "encrypted": sc.get("isEncrypted"), "clusterExtId": sc.get("clusterExtId"), "clusterName": sc.get("clusterName"), } for sc in containers ], } - Tool definition with input schema for list_storage_containers. Defines optional 'cluster_uuid' (string) and 'limit' (integer) parameters.
{ "name": "list_storage_containers", "description": ( "List storage containers available across clusters. " "Returns names, capacity, usage, and associated cluster." ), "inputSchema": { "type": "object", "properties": { "cluster_uuid": { "type": "string", "description": "Filter to a specific cluster UUID", }, "limit": { "type": "integer", "description": "Maximum number of results. Omit to retrieve all (auto-paginates).", }, }, }, }, - src/nutanix_mcp/tools/cluster.py:253-259 (registration)Handler dispatch table mapping 'list_storage_containers' to the handle_list_storage_containers function. Merged into ALL_HANDLERS in server.py.
CLUSTER_HANDLERS: dict[str, Any] = { "list_clusters": handle_list_clusters, "get_cluster": handle_get_cluster, "list_hosts": handle_list_hosts, "get_host": handle_get_host, "list_storage_containers": handle_list_storage_containers, } - src/nutanix_mcp/server.py:35-41 (registration)ALL_HANDLERS merges CLUSTER_HANDLERS (which includes list_storage_containers) into the global dispatch table used by the call_tool handler.
ALL_HANDLERS: dict[str, Any] = { **VM_HANDLERS, **CLUSTER_HANDLERS, **PE_HANDLERS, **REPORT_HANDLERS, **NETWORKING_HANDLERS, }