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
| Name | Required | Description | Default |
|---|---|---|---|
| lab_path | Yes |
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")
- eveng_mcp_server/tools/__init__.py:22-22 (registration)Registration call for lab management tools, which includes the delete_lab tool.register_lab_tools(mcp, eveng_client)
- eveng_mcp_server/server.py:53-53 (registration)Top-level registration of all tools, including delete_lab via the tools module.register_tools(self.mcp, self.eveng_client)