Skip to main content
Glama
moimran
by moimran

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
NameRequiredDescriptionDefault
argumentsYes

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
  • Registration call for connection tools (including test_connection) within the central register_tools function.
    register_connection_tools(mcp, eveng_client)
  • 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

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