Skip to main content
Glama
moimran
by moimran

test_connection

Verify connectivity and check server status for the EVE-NG network emulation platform to ensure proper communication before managing network topologies.

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

  • The main handler function for the 'test_connection' MCP tool. It checks if connected to EVE-NG, fetches server status, and returns success or failure 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." )]
  • Pydantic schema/model for the input arguments of the test_connection tool (no required arguments).
    class TestConnectionArgs(BaseModel): """Arguments for test_connection tool.""" pass # No arguments needed
  • Registration function that calls register_connection_tools (among others), which registers the test_connection tool.
    def register_tools(mcp: "FastMCP", eveng_client: "EVENGClientWrapper") -> None: """Register all MCP tools.""" # Connection management tools register_connection_tools(mcp, eveng_client) # Lab management tools register_lab_tools(mcp, eveng_client) # Node management tools register_node_tools(mcp, eveng_client) # Network management tools register_network_tools(mcp, eveng_client)
  • Where the tools registration is invoked in the main server setup.
    # Register tools register_tools(self.mcp, self.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