Skip to main content
Glama

delete_vm

Permanently removes a virtual machine from UTM. This action is irreversible and cannot be undone.

Instructions

Delete a VM permanently. Cannot be undone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • MCP tool handler for 'delete_vm' — the decorated function that registers the tool and executes the logic. Calls the AppleScript helper and returns a confirmation dict.
    @mcp.tool()
    def delete_vm(name: str) -> dict:
        """Delete a VM permanently. Cannot be undone."""
        utm.delete_vm(name)
        return {"name": name, "deleted": True}
  • AppleScript helper that performs the actual VM deletion via osascript — validates the VM name, constructs and runs the 'delete virtual machine' AppleScript, and returns True on success.
    def delete_vm(name: str) -> bool:
        """Delete a VM. Returns True on success."""
        _validate_vm_name(name)
        script = f'''
        tell application "UTM"
            delete virtual machine named "{_esc(name)}"
        end tell
        '''
        _run(script, timeout=60)
        return True
  • Registration of the 'delete_vm' tool via the @mcp.tool() decorator on the FastMCP instance, making it available as an MCP tool.
    @mcp.tool()
    def delete_vm(name: str) -> dict:
  • Input schema for delete_vm: takes a single 'name' parameter (string) and returns a dict. The type hints define the contract for the MCP tool interface.
    @mcp.tool()
    def delete_vm(name: str) -> dict:
  • Test that confirms 'delete_vm' is registered among the expected MCP tool names.
    expected = {
        "list_vms", "get_vm", "clone_vm", "start_vm", "stop_vm", "delete_vm",
        "suspend_vm", "wait_for_vm", "get_vm_ip", "set_vm_network",
        "set_vm_resources", "rename_vm", "set_vm_display", "list_vm_shares",
        "add_vm_share", "remove_vm_share", "set_vm_shares", "list_vm_drives",
        "attach_drive", "export_vm", "import_vm", "get_serial_port",
    }
    assert expected == names
Behavior4/5

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

Clearly notes the irreversible nature ('Cannot be undone'), which is critical for a destructive operation. Without annotations, this is sufficient but could detail side effects.

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 efficient sentences convey essential information. Front-loaded with action and consequence.

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

Completeness2/5

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

Despite simplicity, the description omits expected details like return value, error scenarios, and permission requirements. With no output schema, agent lacks completeness.

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

Parameters1/5

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

Schema description coverage is 0% and description adds no meaning to the 'name' parameter. Parameter semantics are absent.

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?

Explicitly states action ('Delete a VM') and key attribute ('permanently'), clearly distinguishing from sibling tools like stop_vm or suspend_vm.

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 alternatives, no prerequisites or conditions mentioned. Lacks context for appropriate invocation.

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