Skip to main content
Glama
jkmills

Nutanix MCP Server

by jkmills

pe_get_cluster_info

Retrieve cluster information from a Prism Element node, including AOS version, cluster name, storage capacity, and health status.

Instructions

Get cluster info directly from a Prism Element node. Returns AOS version, cluster name, storage capacity, and health.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pe_hostYesPrism Element CVM IP address or hostname

Implementation Reference

  • Tool definition/registration for pe_get_cluster_info in the PE_TOOLS list, which is exported and registered via the MCP server.
    PE_TOOLS: list[dict] = [
        {
            "name": "pe_get_cluster_info",
            "description": (
                "Get cluster info directly from a Prism Element node. "
                "Returns AOS version, cluster name, storage capacity, and health."
            ),
            "inputSchema": {
                "type": "object",
                "properties": {
                    "pe_host": {
                        "type": "string",
                        "description": "Prism Element CVM IP address or hostname",
                    },
                },
                "required": ["pe_host"],
            },
        },
        {
            "name": "pe_list_vms",
            "description": (
                "List VMs on a specific Prism Element cluster. "
                "Returns VM names, UUIDs, power states, and resource allocation."
            ),
            "inputSchema": {
                "type": "object",
                "properties": {
                    "pe_host": {
                        "type": "string",
                        "description": "Prism Element CVM IP address or hostname",
                    },
                    "count": {
                        "type": "integer",
                        "description": "Maximum number of VMs to return",
                    },
                },
                "required": ["pe_host"],
            },
        },
        {
            "name": "pe_list_hosts",
            "description": (
                "List hypervisor hosts on a Prism Element cluster. "
                "Returns host names, IPs, hardware specs, and CVM info."
            ),
            "inputSchema": {
                "type": "object",
                "properties": {
                    "pe_host": {
                        "type": "string",
                        "description": "Prism Element CVM IP address or hostname",
                    },
                },
                "required": ["pe_host"],
            },
        },
        {
            "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"],
            },
        },
        {
            "name": "pe_list_storage_pools",
            "description": (
                "List storage pools on a Prism Element cluster. "
                "Returns pool names, capacity, and disk composition."
            ),
            "inputSchema": {
                "type": "object",
                "properties": {
                    "pe_host": {
                        "type": "string",
                        "description": "Prism Element CVM IP address or hostname",
                    },
                },
                "required": ["pe_host"],
            },
        },
        {
            "name": "pe_list_disks",
            "description": (
                "List physical disks on a Prism Element cluster. "
                "Returns disk type (SSD/HDD), status, capacity, and location."
            ),
            "inputSchema": {
                "type": "object",
                "properties": {
                    "pe_host": {
                        "type": "string",
                        "description": "Prism Element CVM IP address or hostname",
                    },
                },
                "required": ["pe_host"],
            },
        },
        {
            "name": "pe_list_alerts",
            "description": (
                "List alerts on a Prism Element cluster. "
                "Returns alert titles, severity, timestamps, and affected entities."
            ),
            "inputSchema": {
                "type": "object",
                "properties": {
                    "pe_host": {
                        "type": "string",
                        "description": "Prism Element CVM IP address or hostname",
                    },
                    "resolved": {
                        "type": "boolean",
                        "description": "Include resolved alerts (default: false, only active)",
                        "default": False,
                    },
                    "count": {
                        "type": "integer",
                        "description": "Maximum number of alerts to return (default: 50)",
                        "default": 50,
                    },
                },
                "required": ["pe_host"],
            },
        },
        {
            "name": "pe_list_protection_domains",
            "description": (
                "List protection domains on a Prism Element cluster. "
                "Returns PD names, protected entities, schedules, and replication state."
            ),
            "inputSchema": {
                "type": "object",
                "properties": {
                    "pe_host": {
                        "type": "string",
                        "description": "Prism Element CVM IP address or hostname",
                    },
                },
                "required": ["pe_host"],
            },
        },
        {
            "name": "pe_list_snapshots",
            "description": (
                "List snapshots for a protection domain on a Prism Element cluster."
            ),
            "inputSchema": {
                "type": "object",
                "properties": {
                    "pe_host": {
                        "type": "string",
                        "description": "Prism Element CVM IP address or hostname",
                    },
                    "protection_domain": {
                        "type": "string",
                        "description": "Name of the protection domain",
                    },
                },
                "required": ["pe_host", "protection_domain"],
            },
        },
    ]
  • Handler function that executes the pe_get_cluster_info logic: calls client.pe_get(pe_host, 'cluster') and returns cluster name, uuid, version, node count, storage type, hypervisor types, and external IP.
    async def handle_pe_get_cluster_info(
        client: NutanixClient, arguments: dict[str, Any]
    ) -> dict[str, Any]:
        """Get cluster info from Prism Element v2 API."""
        pe_host = arguments["pe_host"]
        result = await client.pe_get(pe_host, "cluster")
    
        return {
            "name": result.get("name"),
            "clusterUuid": result.get("cluster_uuid"),
            "version": result.get("version"),
            "numNodes": result.get("num_nodes"),
            "storageType": result.get("storage_type"),
            "hypervisorTypes": result.get("hypervisor_types"),
            "clusterExternalIp": result.get("cluster_external_ipaddress"),
        }
  • Handler dispatch mapping that maps the tool name 'pe_get_cluster_info' to its handler function.
    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,
    }
  • The NutanixClient.pe_get method used by the handler to make the GET request to the Prism Element v2 API at the 'cluster' endpoint.
    async def pe_get(
        self,
        pe_host: str,
        path: str,
        params: Optional[dict[str, str]] = None,
    ) -> dict[str, Any]:
        """GET request against a Prism Element v2 API.
    
        Args:
            pe_host: Prism Element CVM IP or hostname
            path: Resource path (e.g., 'vms', 'hosts', 'cluster')
        """
        client = await self._get_pe_client(pe_host)
    
        try:
            response = await client.get(f"/{path}", params=params)
        except httpx.ConnectError as e:
            raise NutanixAPIError(
                f"Connection failed to PE host {pe_host}",
                details=str(e),
            )
        except httpx.TimeoutException as e:
            raise NutanixAPIError(
                f"Request to PE {pe_host} timed out after {self.settings.timeout}s",
                details=str(e),
            )
    
        if response.status_code >= 400:
            self._handle_error(response)
    
        return response.json()
    
    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)
  • MCP server registration: list_tools() returns all tool definitions (including pe_get_cluster_info via PE_TOOLS), and call_tool() dispatches to the correct handler via ALL_HANDLERS (which includes PE_HANDLERS).
    @server.list_tools()
    async def list_tools() -> list[Tool]:
        """Return the list of available tools."""
        return [
            Tool(
                name=tool["name"],
                description=tool["description"],
                inputSchema=tool["inputSchema"],
            )
            for tool in all_tools
        ]
Behavior2/5

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

No annotations are provided, so the description carries full burden. It only lists return fields but does not disclose whether the operation is read-only, requires authentication, has side effects, or any constraints. The behavioral impact is unclear.

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, compact sentence with no fluff. It front-loads the action and then lists outputs, making it easy to scan.

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?

For a simple tool with one parameter and no output schema, the description provides expected return fields. However, it lacks details on data types or structure of returned values. It is mostly complete given low complexity.

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?

Schema coverage is 100% with a clear parameter description ('Prism Element CVM IP address or hostname'). The tool description adds no extra context beyond the schema, so baseline score of 3 is appropriate.

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

Purpose5/5

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

The description clearly states the tool gets cluster info from a Prism Element node and enumerates specific return fields (AOS version, cluster name, storage capacity, health). It distinguishes from sibling tools like 'get_cluster' by specifying 'directly from a Prism Element node'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for direct PE node access but does not explicitly state when to use it vs siblings (e.g., 'get_cluster' for Prism Central). No prerequisites or context for when not to use 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