Skip to main content
Glama
jkmills

Nutanix MCP Server

by jkmills

get_vm

Retrieve detailed configuration of a virtual machine by its UUID, including CPU, memory, disks, and NICs.

Instructions

Get detailed information about a specific VM by its UUID. Returns full configuration including CPU, memory, disks, and NICs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vm_uuidYesThe UUID (extId) of the virtual machine

Implementation Reference

  • The handle_get_vm function is the core handler for the 'get_vm' tool. It extracts vm_uuid from arguments, calls client.v4_get() to fetch VM details via the Nutanix v4 vmm API at path 'ahv/config/vms/{vm_uuid}', and returns the response data.
    async def handle_get_vm(
        client: NutanixClient, arguments: dict[str, Any]
    ) -> dict[str, Any]:
        """Get VM details using v4 vmm API."""
        vm_uuid = arguments["vm_uuid"]
        result = await client.v4_get(
            namespace="vmm",
            path=f"ahv/config/vms/{vm_uuid}",
        )
        return result.get("data", result)
  • The schema/input definition for the 'get_vm' tool. Declares the tool name, description, and inputSchema requiring a 'vm_uuid' string property.
    {
        "name": "get_vm",
        "description": (
            "Get detailed information about a specific VM by its UUID. "
            "Returns full configuration including CPU, memory, disks, and NICs."
        ),
        "inputSchema": {
            "type": "object",
            "properties": {
                "vm_uuid": {
                    "type": "string",
                    "description": "The UUID (extId) of the virtual machine",
                },
            },
            "required": ["vm_uuid"],
        },
    },
  • The VM_HANDLERS dispatch table maps 'get_vm' string to handle_get_vm. This is merged into ALL_HANDLERS in server.py.
    VM_HANDLERS: dict[str, Any] = {
        "list_vms": handle_list_vms,
        "get_vm": handle_get_vm,
        "power_on_vm": handle_power_on_vm,
        "power_off_vm": handle_power_off_vm,
        "create_vm": handle_create_vm,
    }
  • ALL_HANDLERS merges VM_HANDLERS (which includes get_vm) into the global dispatch table used by the call_tool handler.
    # Merge all handler dispatch tables
    ALL_HANDLERS: dict[str, Any] = {
        **VM_HANDLERS,
        **CLUSTER_HANDLERS,
        **PE_HANDLERS,
        **REPORT_HANDLERS,
        **NETWORKING_HANDLERS,
    }
  • The call_tool decorator on the MCP server. Looks up the handler by name in ALL_HANDLERS and invokes it with the client and arguments, enabling dispatching to handle_get_vm when 'get_vm' is called.
    @server.call_tool()
    async def call_tool(name: str, arguments: dict[str, Any]) -> list[TextContent]:
        """Execute a tool and return the result."""
        handler = ALL_HANDLERS.get(name)
        if not handler:
            return [TextContent(
                type="text",
                text=f"Error: Unknown tool '{name}'",
            )]
    
        try:
            result = await handler(client, arguments or {})
            return [TextContent(type="text", text=json.dumps(result, indent=2))]
        except NutanixAPIError as e:
            error_text = f"Error: {e.message}"
            if e.status_code:
                error_text += f" (HTTP {e.status_code})"
            return [TextContent(type="text", text=error_text)]
        except Exception:
            return [TextContent(type="text", text="An unexpected error occurred")]
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It implies a read operation but does not explicitly state it is non-destructive, safe, or what permissions are needed. It fails to fully cover behavioral transparency.

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-constructed sentence with no wasted words. It is appropriately sized and front-loaded with the verb and resource.

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 no output schema, the description explains return values (CPU, memory, disks, NICs) adequately. It covers the main components but could be more explicit about the format or structure. For a low-complexity tool, it is complete enough.

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 schema description for vm_uuid is sufficient. The tool description adds no extra meaning beyond stating it's by UUID, which is already clear. Baseline 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 action (Get), the resource (specific VM by UUID), and what is returned (full configuration including CPU, memory, disks, NICs). It distinguishes from siblings like list_vms (listing) and create_vm (creation).

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 by providing the required UUID but does not explicitly state when to use this tool versus alternatives like list_vms. It lacks explicit when-not or alternative recommendations, though the context is clear for a simple get operation.

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