Skip to main content
Glama
washyu
by washyu

remove_vm_preview

Read-onlyIdempotent

Preview the impact of removing a VM without executing the removal. Returns a structured dry-run report showing what would be affected.

Instructions

Preview what remove_vm would affect without executing. Returns a structured dry-run report. No infrastructure is modified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_idYesDatabase ID of the target device
platformYesVM platform
vm_nameYesName of the VM/container
forceNoForce removal without graceful shutdown

Implementation Reference

  • The handler function for the remove_vm_preview tool. It delegates to handle_remove_vm with dry_run=True injected, so no VM is actually removed.
    async def handle_remove_vm_preview(arguments: dict[str, Any]) -> dict[str, Any]:
        """Handle remove_vm_preview tool.
    
        Delegates to handle_remove_vm with dry_run=True injected.
        No VM is removed.
        """
        return await handle_remove_vm({**arguments, "dry_run": True})
  • Schema definition for remove_vm_preview. Defines the inputSchema with required fields: device_id (integer), platform (enum: docker/lxd), vm_name (string), and optional force (boolean).
    VM_TOOLS["remove_vm_preview"] = {
        "description": (
            "Preview what remove_vm would affect without executing. "
            "Returns a structured dry-run report. No infrastructure is modified."
        ),
        "inputSchema": {
            "type": "object",
            "properties": {
                "device_id": {
                    "type": "integer",
                    "description": "Database ID of the target device",
                },
                "platform": {
                    "type": "string",
                    "enum": ["docker", "lxd"],
                    "description": "VM platform",
                },
                "vm_name": {
                    "type": "string",
                    "description": "Name of the VM/container",
                },
                "force": {
                    "type": "boolean",
                    "default": False,
                    "description": "Force removal without graceful shutdown",
                },
            },
            "required": ["device_id", "platform", "vm_name"],
        },
    }
  • Import of handle_remove_vm_preview from vm_handlers.
    handle_remove_vm_preview,
  • Registration mapping 'remove_vm_preview' tool name to the handle_remove_vm_preview handler function in the TOOL_HANDLERS registry.
    "remove_vm_preview": handle_remove_vm_preview,
  • Listed as a dry-run/preview tool in tool_annotations.py, indicating it's a non-destructive preview operation.
    "remove_vm_preview",
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and the description confirms no modification and adds the nature of the output (dry-run report). This aligns with and extends the annotations without contradiction.

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 three short sentences, each adding essential information. The purpose is front-loaded in the first sentence, and there is no extraneous text.

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?

While the description explains what the tool does and that it's non-destructive, it does not detail the content or format of the dry-run report. With no output schema, more context on the return value would improve completeness.

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?

Input schema covers all 4 parameters with descriptions. The tool description does not add parameter-specific guidance beyond what is in the schema, so the baseline score of 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?

Description clearly states it's a dry-run preview of remove_vm, returns a structured report, and does not modify infrastructure. This perfectly differentiates it from the sibling tool 'remove_vm'.

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

Usage Guidelines4/5

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

The description explicitly says 'without executing' and 'No infrastructure is modified,' guiding the agent to use it as a safe preview before removal. It could explicitly mention 'use this instead of remove_vm when you want to preview effects,' but the purpose is clear enough.

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/washyu/homelab_mcp'

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