disconnect_eveng_server
Terminate the connection to the EVE-NG server and clear active sessions, ensuring proper session cleanup and resource management.
Instructions
Disconnect from EVE-NG server.
This tool closes the connection to the EVE-NG server and cleans up
any active sessions.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The main handler function for disconnect_eveng_server tool. Decorated with @mcp.tool(), it disconnects the EVENG client using eveng_client.disconnect() and returns a success message or warning on error.@mcp.tool() async def disconnect_eveng_server() -> list[TextContent]: """ Disconnect from EVE-NG server. This tool closes the connection to the EVE-NG server and cleans up any active sessions. """ try: logger.info("Disconnecting from EVE-NG server") await eveng_client.disconnect() return [TextContent( type="text", text="Successfully disconnected from EVE-NG server." )] except Exception as e: logger.error(f"Error during disconnect: {e}") return [TextContent( type="text", text=f"Warning: Error during disconnect: {str(e)}\n\n" f"Connection may have been closed already." )]
- eveng_mcp_server/tools/__init__.py:18-20 (registration)Registration call for connection tools, which includes the definition and registration of disconnect_eveng_server via register_connection_tools(mcp, eveng_client).# Connection management tools register_connection_tools(mcp, eveng_client)
- eveng_mcp_server/server.py:52-54 (registration)Top-level tool registration in the server startup, calling register_tools(self.mcp, self.eveng_client) which chains to connection tool registration.# Register tools register_tools(self.mcp, self.eveng_client)