Skip to main content
Glama
jkmills

Nutanix MCP Server

by jkmills

list_clusters

Retrieve a list of Nutanix clusters from Prism Central, including names, UUIDs, versions, and health status.

Instructions

List all Nutanix clusters registered with Prism Central. Returns cluster names, UUIDs, versions, and health status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNoOData filter expression. Example: "name eq 'prod-cluster'"

Implementation Reference

  • The main handler function for the 'list_clusters' tool. Calls the Nutanix v4 clustermgmt API (config/clusters) and returns a structured response with cluster names, UUIDs, function, hypervisor types, operation mode, and redundancy factor.
    async def handle_list_clusters(
        client: NutanixClient, arguments: dict[str, Any]
    ) -> dict[str, Any]:
        """List clusters using v4 clustermgmt API."""
        filter_expr = arguments.get("filter")
    
        result = await client.v4_list_all(
            namespace="clustermgmt",
            path="config/clusters",
            filter=filter_expr,
        )
    
        clusters = result.get("data", [])
        return {
            "count": len(clusters),
            "clusters": [
                {
                    "name": c.get("name"),
                    "extId": c.get("extId"),
                    "clusterFunction": c.get("config", {}).get("clusterFunction"),
                    "hypervisorTypes": c.get("config", {}).get("hypervisorTypes"),
                    "operationMode": c.get("config", {}).get("operationMode"),
                    "redundancyFactor": c.get("config", {}).get("redundancyFactor"),
                }
                for c in clusters
            ],
        }
  • Tool definition with the name 'list_clusters', description, and input schema (accepts an optional 'filter' string for OData filtering).
    CLUSTER_TOOLS: list[dict] = [
        {
            "name": "list_clusters",
            "description": (
                "List all Nutanix clusters registered with Prism Central. "
                "Returns cluster names, UUIDs, versions, and health status."
            ),
            "inputSchema": {
                "type": "object",
                "properties": {
                    "filter": {
                        "type": "string",
                        "description": "OData filter expression. Example: \"name eq 'prod-cluster'\"",
                    },
                },
            },
        },
  • Handler dispatch mapping: maps the string 'list_clusters' to the handle_list_clusters function.
    CLUSTER_HANDLERS: dict[str, Any] = {
        "list_clusters": handle_list_clusters,
  • ALL_HANDLERS merges CLUSTER_HANDLERS (which includes list_clusters) into the global dispatch table used by the call_tool endpoint.
    # Merge all handler dispatch tables
    ALL_HANDLERS: dict[str, Any] = {
        **VM_HANDLERS,
        **CLUSTER_HANDLERS,
        **PE_HANDLERS,
        **REPORT_HANDLERS,
        **NETWORKING_HANDLERS,
    }
  • get_all_tools() aggregates CLUSTER_TOOLS (containing the list_clusters definition) with other tool definitions for registration in the MCP server.
    def get_all_tools() -> list[dict]:
        """Return all registered tool definitions."""
        return VM_TOOLS + CLUSTER_TOOLS + PE_TOOLS + REPORT_TOOLS + NETWORKING_TOOLS
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses that the tool lists clusters and returns specific fields, but does not mention pagination, required permissions, rate limits, or any side effects. For a read-only list operation, this is adequate but not thorough.

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 two sentences, front-loading the action and resource, then listing return fields. Every sentence is informative, with no redundancy or filler.

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 (1 optional param, no output schema), the description covers purpose and return fields. However, it omits details like pagination or sorting, which would help with large result sets.

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 schema has 100% coverage with a single optional 'filter' parameter documented via example. The description adds no additional meaning beyond the schema, maintaining the baseline score of 3.

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 verb 'List', the resource 'Nutanix clusters', and the scope 'registered with Prism Central'. It also specifies the returned fields (names, UUIDs, versions, health status), differentiating it from sibling tools like 'get_cluster'.

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 using this tool to list all clusters, but does not explicitly state when to use it versus alternatives like 'get_cluster' for a single cluster or filtered queries. No exclusions or alternative guidance is 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