Skip to main content
Glama
moimran
by moimran

delete_lab

Permanently remove a lab and all associated resources from the EVE-NG server using a specified lab path. This action is irreversible and deletes all data linked to the lab.

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 @mcp.tool()-decorated async function that implements the core logic of the 'delete_lab' tool. It validates connection, deletes the lab via the EVE-NG client, and returns formatted success or error TextContent.
    @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 model defining the input schema for the 'delete_lab' tool, specifying the required 'lab_path' parameter.
    class DeleteLabArgs(BaseModel): """Arguments for delete_lab tool.""" lab_path: str = Field(description="Full path to the lab to delete")
  • Invocation of register_lab_tools in the central register_tools function, which includes the @mcp.tool() registration for 'delete_lab'.
    register_lab_tools(mcp, 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