Skip to main content
Glama

delete_vm

Permanently deletes a virtual machine. This action cannot be undone.

Instructions

Delete a VM permanently. Cannot be undone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • Core AppleScript handler that executes the 'delete virtual machine' command via osascript. Validates the VM name, runs the 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
  • MCP tool registration for delete_vm. The @mcp.tool() decorator registers it, and the function delegates to utm.delete_vm(name) from applescript layer.
    @mcp.tool()
    def delete_vm(name: str) -> dict:
        """Delete a VM permanently. Cannot be undone."""
        utm.delete_vm(name)
        return {"name": name, "deleted": True}
  • Input schema: accepts 'name' (str) parameter. Returns a dict with 'name' and 'deleted': True.
    @mcp.tool()
    def delete_vm(name: str) -> dict:
        """Delete a VM permanently. Cannot be undone."""
        utm.delete_vm(name)
        return {"name": name, "deleted": True}
  • Helper function _validate_vm_name used by delete_vm to sanitize the VM name input.
    def _validate_vm_name(name: str) -> str:
        if not name or not _VM_NAME_RE.match(name):
            raise ValueError(f"Invalid VM name: {name!r} — only word characters, spaces, hyphens, and dots allowed")
        return name
Behavior3/5

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

No annotations so description must disclose behavior. It correctly signals destruction is permanent, but omits details like required VM state, effect on attached drives, or need for confirmation.

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?

Single sentence that is direct and contains no filler. Perfectly concise for the information it conveys.

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?

Adequate for a simple destructive operation with one required parameter, but lacks preconditions and post-condition details beyond permanence.

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?

Input schema has one parameter 'name' with zero description. The description does not mention this parameter or explain its format/usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states 'Delete a VM' which identifies the action and resource. The permanence is noted, helping distinguish from stop/suspend siblings.

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 delete vs other VM lifecycle tools like stop or suspend. No prerequisites 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