Skip to main content
Glama
moimran

EVE-NG MCP Server

by moimran

delete_lab

Permanently delete a lab and all its resources from EVE-NG network emulation platform. This action cannot be undone.

Instructions

Delete a lab from EVE-NG.

This tool permanently deletes a lab and all its associated resources from the EVE-NG server. This action cannot be undone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lab_pathYes

Implementation Reference

  • The core handler function for the 'delete_lab' MCP tool. It checks connection, calls the EVE-NG client to delete the lab, and returns success or error messages.
    @mcp.tool()
    async def delete_lab(lab_path: str) -> list[TextContent]:
        """
        Delete a lab from EVE-NG.
    
        This tool permanently deletes a lab and all its associated resources
        from the EVE-NG server. This action cannot be undone.
        """
        try:
            logger.info(f"Deleting lab: {lab_path}")
    
            if not eveng_client.is_connected:
                return [TextContent(
                    type="text",
                    text="Not connected to EVE-NG server. Use connect_eveng_server tool first."
                )]
    
            # Delete lab
            await eveng_client.client.delete_lab(lab_path)
    
            return [TextContent(
                type="text",
                text=f"Successfully deleted lab: {lab_path}\n\n"
                     f"⚠️  This action cannot be undone. The lab and all its "
                     f"associated resources have been permanently removed."
            )]
    
        except Exception as e:
            logger.error(f"Failed to delete lab: {e}")
            return [TextContent(
                type="text",
                text=f"Failed to delete lab: {str(e)}"
            )]
  • Pydantic schema defining the input arguments for the delete_lab tool.
    class DeleteLabArgs(BaseModel):
        """Arguments for delete_lab tool."""
        lab_path: str = Field(description="Full path to the lab to delete")
  • Registration call for lab management tools, which includes the delete_lab tool.
    register_lab_tools(mcp, eveng_client)
  • Top-level registration of all tools, including delete_lab via the tools module.
    register_tools(self.mcp, self.eveng_client)

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/moimran/eveng-mcp'

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