Skip to main content
Glama
wagonbomb

Megaraptor MCP

by wagonbomb

destroy_deployment

Remove a Velociraptor deployment permanently to clean up resources. This irreversible action deletes all associated data and requires confirmation.

Instructions

Destroy a Velociraptor deployment and clean up resources.

WARNING: This action is irreversible. All data will be lost.

Args: deployment_id: The deployment identifier to destroy confirm: Must be True to confirm destruction

Returns: Destruction status and cleanup details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deployment_idYes
confirmNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The destroy_deployment tool handler in src/megaraptor_mcp/tools/deployment.py which performs the cleanup of deployments.
    async def destroy_deployment(
        deployment_id: str,
        confirm: bool = False,
    ) -> list[TextContent]:
        """Destroy a Velociraptor deployment and clean up resources.
    
        WARNING: This action is irreversible. All data will be lost.
    
        Args:
            deployment_id: The deployment identifier to destroy
            confirm: Must be True to confirm destruction
    
        Returns:
            Destruction status and cleanup details.
        """
        if not confirm:
            return [TextContent(
                type="text",
                text=json.dumps({
                    "error": "Destruction not confirmed",
                    "message": "Set confirm=True to destroy the deployment",
                    "warning": "This action is irreversible. All data will be lost.",
                }, indent=2)
            )]
    
        try:
            # Validate deployment_id
            deployment_id = validate_deployment_id(deployment_id)
    
            from ..deployment.deployers import DockerDeployer, BinaryDeployer
            from ..deployment.security import CertificateManager, CredentialStore
    
            # Try Docker first
            deployer = DockerDeployer()
            info = await deployer.get_status(deployment_id)
    
            if info:
                result = await deployer.destroy(deployment_id, force=True)
    
                # Clean up certificates and credentials
                cert_manager = CertificateManager()
                cert_manager.delete_bundle(deployment_id)
    
                cred_store = CredentialStore()
                cred_store.clear_deployment(deployment_id)
    
                return [TextContent(
                    type="text",
                    text=json.dumps(result.to_dict(), indent=2)
                )]
    
            # Try binary deployer
            deployer = BinaryDeployer()
            result = await deployer.destroy(deployment_id, force=True)
    
            return [TextContent(
                type="text",
                text=json.dumps(result.to_dict(), indent=2)
            )]
    
        except ValueError as e:
            # Validation errors
            return [TextContent(
                type="text",
                text=json.dumps({
                    "error": str(e),
                    "hint": "Provide a valid deployment ID starting with 'vr-'"
                }, indent=2)
            )]
    
        except ImportError as e:
            return [TextContent(
                type="text",
                text=json.dumps({
                    "error": f"Missing dependency: {str(e)}",
                    "hint": "Install required packages with: pip install megaraptor-mcp[deployment]"
                }, indent=2)
            )]
    
        except Exception:
            # Generic errors - don't expose internals
            return [TextContent(
                type="text",
                text=json.dumps({
                    "error": "Failed to destroy deployment",
                    "hint": "Check deployment ID and ensure deployment exists"
                }, indent=2)
            )]
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It successfully discloses critical behavioral traits: irreversibility, total data loss, resource cleanup, and the confirmation mechanism (confirm=True required). It also notes the return value contains 'Destruction status and cleanup details.' Could mention side effects on active hunts/flows.

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?

Excellent structure: one-sentence purpose statement, prominent safety warning (appropriate for destructive tool), Args section documenting parameters, and Returns section. Every element earns its place; no fluff. Critical irreversibility warning is front-loaded.

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 the tool has 2 simple parameters (no nested objects), an output schema exists (reducing need for detailed return documentation), and the description compensates for missing annotations with safety warnings, the description is complete. Minor gap: could mention authentication/authorization requirements for such a dangerous operation.

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

Parameters5/5

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

The schema has 0% description coverage (only titles and types). The Args section compensates fully by documenting deployment_id as 'The deployment identifier to destroy' and confirm as 'Must be True to confirm destruction,' adding essential semantic meaning entirely absent from the schema.

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 opens with 'Destroy a Velociraptor deployment and clean up resources'—a specific verb (destroy) plus specific resource (Velociraptor deployment). It clearly distinguishes from sibling tools like deploy_server, list_deployments, or get_deployment_status by specifying this is a destructive cleanup operation.

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 prominent WARNING about irreversibility and data loss provides implicit usage guidance (only use when permanent destruction is intended), but there is no explicit guidance on when to choose this over alternatives like validate_deployment or simply decommissioning resources, nor are 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/wagonbomb/megaraptor-mcp'

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