Skip to main content
Glama
jkmills

Nutanix MCP Server

by jkmills

generate_environment_report

Generate a comprehensive As-Built report for your Nutanix environment, covering clusters, hosts, storage, networking, and VM inventory. Returns Markdown with an Excalidraw topology diagram.

Instructions

Generate a comprehensive As-Built report for the full Nutanix environment. Covers all clusters, hosts, storage, networking, and VM inventory registered with Prism Central. Returns Markdown with an Excalidraw topology diagram.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_vmsNoInclude full VM inventory in the report (default: true)
include_diagramNoInclude Excalidraw topology diagram JSON (default: true)

Implementation Reference

  • Tool definition (name, description, inputSchema) for generate_environment_report
    REPORT_TOOLS: list[dict] = [
        {
            "name": "generate_environment_report",
            "description": (
                "Generate a comprehensive As-Built report for the full Nutanix environment. "
                "Covers all clusters, hosts, storage, networking, and VM inventory registered "
                "with Prism Central. Returns Markdown with an Excalidraw topology diagram."
            ),
            "inputSchema": {
                "type": "object",
                "properties": {
                    "include_vms": {
                        "type": "boolean",
                        "description": "Include full VM inventory in the report (default: true)",
                        "default": True,
                    },
                    "include_diagram": {
                        "type": "boolean",
                        "description": "Include Excalidraw topology diagram JSON (default: true)",
                        "default": True,
                    },
                },
            },
        },
  • Handler function that fetches clusters, hosts, containers, subnets, VMs, builds markdown report and optional Excalidraw diagram
    async def handle_generate_environment_report(
        client: NutanixClient, arguments: dict[str, Any]
    ) -> dict[str, Any]:
        """Generate full environment As-Built report."""
        include_vms = arguments.get("include_vms", True)
        include_diagram = arguments.get("include_diagram", True)
    
        # Collect all environment data
        clusters_result = await client.v4_list(
            namespace="clustermgmt", path="config/clusters"
        )
        clusters = clusters_result.get("data", [])
    
        # Get detailed info for each cluster
        detailed_clusters = []
        hosts_by_cluster: dict[str, list[dict]] = {}
        for cluster in clusters:
            ext_id = cluster.get("extId", "")
            # Get full cluster details
            try:
                detail = await client.v4_get(
                    namespace="clustermgmt", path=f"config/clusters/{ext_id}"
                )
                detailed_clusters.append(detail.get("data", cluster))
            except Exception:
                detailed_clusters.append(cluster)
    
            # Get hosts for this cluster
            try:
                hosts_result = await client.v4_list(
                    namespace="clustermgmt",
                    path=f"config/clusters/{ext_id}/hosts",
                )
                hosts_by_cluster[ext_id] = hosts_result.get("data", [])
            except Exception:
                hosts_by_cluster[ext_id] = []
    
        # Get storage containers
        try:
            containers_result = await client.v4_list(
                namespace="clustermgmt", path="config/storage-containers"
            )
            containers = containers_result.get("data", [])
        except Exception:
            containers = []
    
        # Get subnets
        try:
            subnets_result = await client.v4_list(
                namespace="networking", path="config/subnets"
            )
            subnets = subnets_result.get("data", [])
        except Exception:
            subnets = []
    
        # Get VMs
        vms = []
        if include_vms:
            try:
                vms_result = await client.v4_list(
                    namespace="vmm", path="ahv/config/vms"
                )
                vms = vms_result.get("data", [])
            except Exception:
                vms = []
    
        # Build markdown report
        markdown = _build_environment_markdown(
            detailed_clusters, hosts_by_cluster, vms, containers, subnets
        )
    
        result: dict[str, Any] = {"report_markdown": markdown}
    
        # Build diagram
        if include_diagram:
            diagram_elements = _generate_environment_diagram(
                detailed_clusters, hosts_by_cluster
            )
            result["excalidraw_diagram"] = {
                "type": "excalidraw",
                "version": 2,
                "elements": diagram_elements,
                "appState": {"viewBackgroundColor": "#ffffff"},
            }
    
        return result
  • Handler dispatch mapping from tool name to handler function
    REPORT_HANDLERS: dict[str, Any] = {
        "generate_environment_report": handle_generate_environment_report,
        "generate_cluster_report": handle_generate_cluster_report,
        "generate_vm_report": handle_generate_vm_report,
    }
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses that the tool returns Markdown with an Excalidraw diagram, but does not mention whether the operation is read-only, potential performance impacts (due to comprehensive scope), or permission requirements. The output format is clear, but behavioral traits are insufficiently covered.

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 with no wasted words. The first sentence front-loads the purpose, and the second adds output format. Every sentence earns its place.

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

Completeness3/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 the return format (Markdown + diagram) adequately. However, it lacks information about potential report size, execution time, or prerequisites. Context around when to use this over sibling reports is also missing, making it only partially complete.

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 description coverage is 100%, with two boolean parameters having clear descriptions and defaults. The tool description does not add significant meaning beyond the schema; it only mentions 'include VMs' and 'Excalidraw diagram', which are already in schema. 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 that the tool generates a comprehensive As-Built report for the full Nutanix environment, covering all clusters, hosts, storage, networking, and VM inventory. It uses specific verb 'generate' and resource 'report', and distinguishes itself from siblings like generate_cluster_report and generate_vm_report by being environment-wide.

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 a full environment overview but does not explicitly state when to use this tool versus alternative report tools (e.g., generate_cluster_report, generate_vm_report). No when-not or alternative guidance is provided, leaving the agent to infer context.

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