test_connection
Verify the connection to an EVE-NG server and retrieve server status information to ensure proper functionality within the EVE-NG MCP Server environment.
Instructions
Test connection to EVE-NG server.
This tool verifies that the connection to the EVE-NG server is working
properly and returns server status information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| arguments | Yes |
Implementation Reference
- MCP tool handler for 'test_connection': Verifies EVE-NG server connection by checking client status and fetching server status, returns formatted success or error message.@mcp.tool() async def test_connection(arguments: TestConnectionArgs) -> list[TextContent]: """ Test connection to EVE-NG server. This tool verifies that the connection to the EVE-NG server is working properly and returns server status information. """ try: logger.info("Testing EVE-NG server connection") if not eveng_client.is_connected: return [TextContent( type="text", text="Not connected to EVE-NG server. Use connect_eveng_server tool first." )] # Test connection by getting server status status = await eveng_client.get_server_status() return [TextContent( type="text", text=f"Connection test successful!\n\n" f"Server: {eveng_client.config.eveng.base_url}\n" f"Status: Connected\n" f"Server Version: {status.get('version', 'Unknown')}\n" f"Server Status: {status.get('status', 'Unknown')}\n" f"Uptime: {status.get('uptime', 'Unknown')}" )] except Exception as e: logger.error(f"Connection test failed: {e}") return [TextContent( type="text", text=f"Connection test failed: {str(e)}\n\n" f"Please check your connection and try again." )]
- Input schema (Pydantic model) for the test_connection tool, requiring no arguments.class TestConnectionArgs(BaseModel): """Arguments for test_connection tool.""" pass # No arguments needed
- eveng_mcp_server/tools/__init__.py:19-19 (registration)Registration call for connection tools (including test_connection) within the central register_tools function.register_connection_tools(mcp, eveng_client)
- eveng_mcp_server/server.py:52-53 (registration)Top-level registration of all tools in the MCP server, which includes test_connection via the tools module chain.# Register tools register_tools(self.mcp, self.eveng_client)
- Helper method in EVENGClientWrapper used for connection testing (though tool primarily uses get_server_status).async def test_connection(self) -> bool: """Test connection to EVE-NG server.""" try: await self.ensure_connected() # Just check if we're authenticated return self.is_connected except Exception as e: self.logger.error("Connection test failed", **log_error(e)) return False