Skip to main content
Glama
jkmills

Nutanix MCP Server

by jkmills

pe_list_containers

Retrieve storage container details including name, capacity, usage, replication factor, and policies from a Nutanix Prism Element cluster.

Instructions

List storage containers on a Prism Element cluster. Returns names, capacity, usage, replication factor, and policies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pe_hostYesPrism Element CVM IP address or hostname

Implementation Reference

  • The handler function for pe_list_containers. Calls client.pe_list(pe_host, 'containers'), then maps each container entity to name, containerUuid, storagePoolUuid, maxCapacityBytes, replicationFactor, compressionEnabled, and erasureCoded fields.
    async def handle_pe_list_containers(
        client: NutanixClient, arguments: dict[str, Any]
    ) -> dict[str, Any]:
        """List storage containers from Prism Element v2 API."""
        pe_host = arguments["pe_host"]
        result = await client.pe_list(pe_host, "containers")
        entities = result.get("entities", [])
    
        return {
            "count": len(entities),
            "containers": [
                {
                    "name": c.get("name"),
                    "containerUuid": c.get("container_uuid"),
                    "storagePoolUuid": c.get("storage_pool_uuid"),
                    "maxCapacityBytes": c.get("max_capacity"),
                    "replicationFactor": c.get("replication_factor"),
                    "compressionEnabled": c.get("compression_enabled"),
                    "erasureCoded": c.get("erasure_coded"),
                }
                for c in entities
            ],
        }
  • Tool definition and input schema for pe_list_containers. Defines name, description, and inputSchema requiring 'pe_host' (string).
    {
        "name": "pe_list_containers",
        "description": (
            "List storage containers on a Prism Element cluster. "
            "Returns names, capacity, usage, replication factor, and policies."
        ),
        "inputSchema": {
            "type": "object",
            "properties": {
                "pe_host": {
                    "type": "string",
                    "description": "Prism Element CVM IP address or hostname",
                },
            },
            "required": ["pe_host"],
        },
    },
  • PE_HANDLERS dispatch dict mapping tool name 'pe_list_containers' to its handler function handle_pe_list_containers.
    PE_HANDLERS: dict[str, Any] = {
        "pe_get_cluster_info": handle_pe_get_cluster_info,
        "pe_list_vms": handle_pe_list_vms,
        "pe_list_hosts": handle_pe_list_hosts,
        "pe_list_containers": handle_pe_list_containers,
        "pe_list_storage_pools": handle_pe_list_storage_pools,
        "pe_list_disks": handle_pe_list_disks,
        "pe_list_alerts": handle_pe_list_alerts,
        "pe_list_protection_domains": handle_pe_list_protection_domains,
        "pe_list_snapshots": handle_pe_list_snapshots,
    }
  • ALL_HANDLERS merges PE_HANDLERS (including pe_list_containers) into a single dispatch map used by the MCP server's call_tool handler.
    # Merge all handler dispatch tables
    ALL_HANDLERS: dict[str, Any] = {
        **VM_HANDLERS,
        **CLUSTER_HANDLERS,
        **PE_HANDLERS,
        **REPORT_HANDLERS,
        **NETWORKING_HANDLERS,
    }
  • The client.pe_list() helper method called by the handler. Delegates to pe_get() which makes an HTTP GET request to the Prism Element v2 API at /{resource} (here 'containers').
    async def pe_list(
        self,
        pe_host: str,
        resource: str,
        count: Optional[int] = None,
        filter_criteria: Optional[str] = None,
    ) -> dict[str, Any]:
        """List resources from a Prism Element node using v2 API.
    
        Args:
            pe_host: Prism Element CVM IP or hostname
            resource: Resource type (e.g., 'vms', 'hosts', 'disks', 'containers')
            count: Max results to return
            filter_criteria: Filter string for the query
        """
        params: dict[str, str] = {}
        if count is not None:
            params["count"] = str(count)
        if filter_criteria:
            params["filter_criteria"] = filter_criteria
    
        return await self.pe_get(pe_host, resource, params=params)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the behavioral transparency burden. It does not disclose whether the operation is read-only, any authentication requirements, or potential side effects. The name suggests listing, but this is not explicitly stated.

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 a single, well-structured sentence that is concise yet informative. There is no unnecessary information, and it is easy to read.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity of the tool (one parameter, no output schema), the description adequately covers the return values. It could mention pagination or result limits, but overall it is fairly complete for a list tool.

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, so the schema already documents the 'pe_host' parameter. The description does not add meaning beyond what the schema provides, so the baseline score of 3 is appropriate.

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

Purpose4/5

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

The description clearly states the action 'List', the resource 'storage containers', and the context 'on a Prism Element cluster'. It also lists the return fields. However, it does not explicitly differentiate from sibling tools like 'list_storage_containers', so it loses a point.

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?

There is no guidance on when to use this tool versus alternatives, such as 'list_storage_containers' or other listing tools. No usage context or exclusions are provided.

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

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/jkmills/nutanix-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server