Skip to main content
Glama
moimran
by moimran

wipe_node

Reset a node to factory state in EVE-NG by deleting all user configuration, including startup-config and VLANs, so the next start rebuilds from the selected image.

Instructions

Wipe a specific node (reset to factory state).

This tool wipes a node, deleting all user configuration including startup-config, VLANs, and other settings. The next start will rebuild the node from the selected image.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argumentsYes

Implementation Reference

  • The main handler function for the wipe_node MCP tool. It validates input using NodeControlArgs, checks connection, calls the EVENGClientWrapper.wipe_node helper, and formats the response as TextContent.
    @mcp.tool() async def wipe_node(arguments: NodeControlArgs) -> list[TextContent]: """ Wipe a specific node (reset to factory state). This tool wipes a node, deleting all user configuration including startup-config, VLANs, and other settings. The next start will rebuild the node from the selected image. """ try: logger.info(f"Wiping node {arguments.node_id} in {arguments.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." )] # Wipe node result = await eveng_client.wipe_node(arguments.lab_path, arguments.node_id) if result.get('status') == 'success': return [TextContent( type="text", text=f"Successfully wiped node {arguments.node_id} in {arguments.lab_path}\n\n" f"⚠️ All user configuration has been deleted. The node has been reset to factory state.\n" f"The next start will rebuild the node from the selected image." )] else: return [TextContent( type="text", text=f"Failed to wipe node: {result.get('message', 'Unknown error')}" )] except Exception as e: logger.error(f"Failed to wipe node: {e}") return [TextContent( type="text", text=f"Failed to wipe node: {str(e)}" )]
  • Pydantic schema defining the input arguments for the wipe_node tool (shared with other node control tools like start_node, stop_node).
    class NodeControlArgs(BaseModel): """Arguments for node control operations.""" lab_path: str = Field(description="Full path to the lab (e.g., /lab_name.unl)") node_id: str = Field(description="Node ID to control")
  • Registration call for node management tools, which includes the wipe_node tool via the register_node_tools function.
    # Node management tools register_node_tools(mcp, eveng_client)
  • Helper method in EVENGClientWrapper that wraps the underlying EVE-NG API call to wipe_node, with connection management and error handling.
    async def wipe_node(self, lab_path: str, node_id: str) -> Dict[str, Any]: """Wipe a specific node (reset to factory state).""" await self.ensure_connected() try: result = await asyncio.to_thread(self.api.wipe_node, lab_path, int(node_id)) self.logger.info("Wiped node", lab_path=lab_path, node_id=node_id) return result except Exception as e: self.logger.error("Failed to wipe node", **log_error(e, {"lab_path": lab_path, "node_id": node_id})) raise EVENGAPIError(f"Failed to wipe node: {str(e)}")

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