Skip to main content
Glama

list_vms

List all registered UTM virtual machines and view their current status to manage virtual environments on macOS.

Instructions

List all registered UTM virtual machines with their status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool 'list_vms' is registered as a FastMCP tool via the @mcp.tool() decorator.
    @mcp.tool()
    def list_vms() -> list[dict]:
  • The MCP tool handler function that lists all registered UTM VMs by calling the AppleScript helper.
    def list_vms() -> list[dict]:
        """List all registered UTM virtual machines with their status."""
        return [vm.to_dict() for vm in utm.list_vms()]
  • The AppleScript helper function that executes the osascript command to list all UTM virtual machines and parses the output into VMInfo objects.
    def list_vms() -> list[VMInfo]:
        """List all registered UTM virtual machines."""
        script = '''
        tell application "UTM"
            set output to ""
            repeat with vm in virtual machines
                set vmId to id of vm
                set vmName to name of vm
                set vmStatus to status of vm as text
                set vmBackend to backend of vm as text
                set output to output & vmId & "||" & vmName & "||" & vmStatus & "||" & vmBackend & linefeed
            end repeat
            return output
        end tell
        '''
        raw = _run(script)
        vms = []
        for line in raw.strip().split("\n"):
            line = line.strip()
            if not line:
                continue
            parts = line.split("||")
            if len(parts) >= 4:
                vms.append(VMInfo(id=parts[0], name=parts[1], status=parts[2], backend=parts[3]))
        return vms
  • The VMInfo dataclass representing the schema of a listed VM (id, name, status, backend) with a to_dict() method.
    @dataclass
    class VMInfo:
        id: str
        name: str
        status: str
        backend: str
    
        def to_dict(self) -> dict:
            return {"id": self.id, "name": self.name, "status": self.status, "backend": self.backend}
Behavior2/5

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

No annotations are provided, so the description bears full responsibility for behavioral disclosure. It only states 'List all registered UTM virtual machines with their status' but does not mention whether it is read-only, requires authentication, or has any side effects. This is insufficient for a tool with no annotations.

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, focused sentence that efficiently conveys the tool's purpose. Every word adds value, and it is front-loaded with the essential information.

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?

The tool is simple (0 parameters) and has an output schema to describe return values, which minimizes the need for additional description. However, the lack of any behavioral or safety notes (e.g., read-only, safe to call) in the absence of annotations leaves a slight gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema is empty (0 parameters). With no parameters to document, the description does not need to add parameter information. The baseline score of 4 is appropriate as the schema coverage is 100%.

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 the resource 'all registered UTM virtual machines' with the additional detail 'with their status'. This distinguishes it from sibling tools like 'get_vm' (single VM) and action-oriented tools like 'start_vm'.

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 context of being a simple list tool is implied by the description and sibling names, but there is no explicit guidance on when to use this vs alternatives like 'get_vm' for a single VM or 'list_vm_drives' for drives. No exclusions or prerequisites are 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/neverprepared/mcp-utm'

If you have feedback or need assistance with the MCP directory API, please join our Discord server