Skip to main content
Glama
jkmills

Nutanix MCP Server

by jkmills

get_host

Retrieves detailed information about a host, including hardware specs, hypervisor details, and resource usage, using the host UUID.

Instructions

Get detailed information about a specific host by UUID. Returns hardware specs, hypervisor info, and resource usage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
host_uuidYesThe UUID (extId) of the host

Implementation Reference

  • The actual handler function for the 'get_host' tool. It calls client.v4_get with namespace='clustermgmt' and path='config/hosts/{host_uuid}'. Returns the data from the Nutanix v4 API.
    async def handle_get_host(
        client: NutanixClient, arguments: dict[str, Any]
    ) -> dict[str, Any]:
        """Get host details using v4 clustermgmt API."""
        host_uuid = arguments["host_uuid"]
        result = await client.v4_get(
            namespace="clustermgmt",
            path=f"config/hosts/{host_uuid}",
        )
        return result.get("data", result)
  • The input schema definition for the 'get_host' tool. It requires a 'host_uuid' string parameter and describes returning hardware specs, hypervisor info, and resource usage.
    {
        "name": "get_host",
        "description": (
            "Get detailed information about a specific host by UUID. "
            "Returns hardware specs, hypervisor info, and resource usage."
        ),
        "inputSchema": {
            "type": "object",
            "properties": {
                "host_uuid": {
                    "type": "string",
                    "description": "The UUID (extId) of the host",
                },
            },
            "required": ["host_uuid"],
        },
    },
  • The CLUSTER_HANDLERS dispatch table mapping 'get_host' to handle_get_host. This dictionary is imported into server.py where all handlers are merged into ALL_HANDLERS.
    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,
    }
  • ALL_HANDLERS merges CLUSTER_HANDLERS (and other handler dicts). The server's call_tool handler looks up tool names in this dictionary to dispatch to the correct handler.
    ALL_HANDLERS: dict[str, Any] = {
        **VM_HANDLERS,
        **CLUSTER_HANDLERS,
        **PE_HANDLERS,
        **REPORT_HANDLERS,
        **NETWORKING_HANDLERS,
    }
  • The v4_get method on NutanixClient that handle_get_host calls. It constructs a GET request to the v4 API at /{namespace}/v4.0/{path} and returns the JSON response.
    async def v4_get(
        self,
        namespace: str,
        path: str,
        params: Optional[dict[str, str]] = None,
    ) -> dict[str, Any]:
        """GET request against v4 API.
    
        Args:
            namespace: API namespace (e.g., 'vmm', 'clustermgmt', 'prism')
            path: Resource path (e.g., 'ahv/config/vms')
            params: Optional OData query parameters
        """
        client = await self._get_client()
        url = f"/{namespace}/{self.V4_VERSION}/{path}"
    
        for attempt in range(self.MAX_RETRIES + 1):
            try:
                response = await client.get(url, params=params)
            except httpx.ConnectError as e:
                raise NutanixAPIError(
                    f"Connection failed to {self.settings.host}:{self.settings.port}",
                    details=str(e),
                )
            except httpx.TimeoutException as e:
                raise NutanixAPIError(
                    f"Request timed out after {self.settings.timeout}s",
                    details=str(e),
                )
    
            if response.status_code == 429 and attempt < self.MAX_RETRIES:
                wait = self.RETRY_BACKOFF_BASE * (2 ** attempt)
                await asyncio.sleep(wait)
                continue
    
            if response.status_code >= 400:
                self._handle_error(response)
    
            return response.json()
    
        # Should not reach here, but safety net
        self._handle_error(response)
        return {}  # unreachable
Behavior4/5

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

With no annotations, the description must bear full burden. It clearly states that the tool returns detailed information without modifying state, which is sufficient for a read operation. It could mention that there are no side effects, but 'get' already implies idempotency.

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 conveys all necessary information without any waste or redundancy.

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

Completeness5/5

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

For a simple get tool with one parameter, the description is complete. It mentions what data is returned, which is sufficient even without an output schema. The context is fully addressed.

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%, and the description adds minimal extra meaning beyond the parameter description. The main description mentions 'by UUID', but the schema already captures that. No additional semantics are needed.

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 'Get', the resource 'host', and the specific identifier 'by UUID'. It also lists what is returned (hardware specs, hypervisor info, resource usage), distinguishing it from sibling tools like list_hosts.

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

Usage Guidelines4/5

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

The description implicitly indicates when to use this tool (when you have a UUID) and not to use it for listing (use list_hosts instead). However, it lacks explicit exclusions or alternatives, so it misses the top score.

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