Skip to main content
Glama
jkmills

Nutanix MCP Server

by jkmills

list_images

List disk images from the image library, including ISOs and QCOW2 files, with details on name, type, size, and source URI.

Instructions

List disk images (ISOs, QCOW2) available in the image library. Returns image names, types, sizes, and source URIs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNoOData filter expression. Examples: "name eq 'ubuntu-22.04'", "type eq 'DISK_IMAGE'"
limitNoMaximum number of images to return. Omit to retrieve all (auto-paginates).

Implementation Reference

  • The async handler function that executes the list_images tool logic. Calls client.v4_list_all with namespace='vmm' and path='content/images', then maps the response to image names, extIds, types, sizes, source URIs, and descriptions.
    async def handle_list_images(
        client: NutanixClient, arguments: dict[str, Any]
    ) -> dict[str, Any]:
        """List images using v4 vmm API."""
        filter_expr = arguments.get("filter")
        limit = arguments.get("limit")
    
        result = await client.v4_list_all(
            namespace="vmm",
            path="content/images",
            filter=filter_expr,
            max_results=limit,
        )
    
        images = result.get("data", [])
        metadata = result.get("metadata", {})
        return {
            "count": len(images),
            "truncated": metadata.get("truncated", False),
            "images": [
                {
                    "name": img.get("name"),
                    "extId": img.get("extId"),
                    "type": img.get("type"),
                    "sizeBytes": img.get("sizeBytes"),
                    "sourceUri": img.get("source", {}).get("url") if img.get("source") else None,
                    "description": img.get("description"),
                }
                for img in images
            ],
        }
  • The tool definition/schema for list_images, declaring the name, description, and inputSchema with optional 'filter' (string) and 'limit' (integer) parameters.
    {
        "name": "list_images",
        "description": (
            "List disk images (ISOs, QCOW2) available in the image library. "
            "Returns image names, types, sizes, and source URIs."
        ),
        "inputSchema": {
            "type": "object",
            "properties": {
                "filter": {
                    "type": "string",
                    "description": (
                        "OData filter expression. Examples: "
                        "\"name eq 'ubuntu-22.04'\", \"type eq 'DISK_IMAGE'\""
                    ),
                },
                "limit": {
                    "type": "integer",
                    "description": "Maximum number of images to return. Omit to retrieve all (auto-paginates).",
                },
            },
        },
    },
  • The handler dispatch dictionary NETWORKING_HANDLERS mapping the string 'list_images' to the handle_list_images function.
    NETWORKING_HANDLERS: dict[str, Any] = {
        "list_subnets": handle_list_subnets,
        "get_subnet": handle_get_subnet,
        "list_images": handle_list_images,
  • The ALL_HANDLERS registry merging all handler dispatch tables, including NETWORKING_HANDLERS which contains list_images.
    # Merge all handler dispatch tables
    ALL_HANDLERS: dict[str, Any] = {
        **VM_HANDLERS,
        **CLUSTER_HANDLERS,
        **PE_HANDLERS,
        **REPORT_HANDLERS,
        **NETWORKING_HANDLERS,
    }
  • The get_all_tools() function aggregates all tool definitions including NETWORKING_TOOLS (which contains list_images) for registration with 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, the description bears full burden. It correctly states the read operation and return fields. However, it does not cover potential rate limits, auth needs, or pagination behavior beyond the schema's limit parameter, leaving some gaps.

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?

Two sentences, front-loaded with action and resource, no wasted words. Every sentence adds value.

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 100% schema coverage, no output schema, and simple read operation, the description is mostly complete. It could mention pagination explicitly, but the schema covers limit. Adequate for a straightforward list tool.

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%, so baseline is 3. The description adds no extra meaning to the filter or limit parameters beyond what the schema already provides.

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' and resource 'disk images (ISOs, QCOW2) available in the image library', distinguishing it from siblings like get_image or list_vms. It also specifies return fields: image names, types, sizes, and source URIs.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus siblings like get_image (single image) or other list tools. No when-not-to-use or alternatives mentioned.

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