Skip to main content
Glama

test_connection

Verify connectivity to the Wakapi server by testing API access and retrieving project count to ensure proper integration for development time tracking.

Instructions

Test Wakapi server connection via simple API call to fetch projects.

Returns: A dictionary with the connection test result, including: - status (str): 'success' or 'error'. - message (str): Description of the result. - projects_count (int, optional): Number of projects if successful. - server_url (str): The Wakapi server URL. - api_path (str): The API path used for requests. - error (str, optional): Error message if failed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'test_connection' tool. It tests the connection to the Wakapi server by attempting to fetch projects and returns a status dictionary.
    @app.tool async def test_connection() -> dict[str, Any]: """Test Wakapi server connection via simple API call to fetch projects. Returns: A dictionary with the connection test result, including: - status (str): 'success' or 'error'. - message (str): Description of the result. - projects_count (int, optional): Number of projects if successful. - server_url (str): The Wakapi server URL. - api_path (str): The API path used for requests. - error (str, optional): Error message if failed. """ logger = get_logger("connection_tool") from mcp_tools.dependency_injection import get_wakapi_client logger.info("Starting connection test", method="test_connection") client = get_wakapi_client() try: # Test connection with a simple API call projects = await client.get_projects() logger.debug( f"Projects type: {type(projects)}, data length: " f"{len(projects.data) if hasattr(projects, 'data') else 'No data attr'}" ) return { "status": "success", "message": f"Successfully connected to Wakapi server " f"({client.config.base_url})", "projects_count": len(projects.data), "server_url": client.config.base_url, "api_path": client.config.api_path, } except Exception as e: return { "status": "error", "message": f"Failed to connect to Wakapi server: {e!s}", "server_url": client.config.base_url, "api_path": client.config.api_path, "error": str(e), }
  • main.py:151-153 (registration)
    The import statement that triggers the registration of the test_connection tool via its @app.tool decorator.
    from mcp_tools.connection import test_connection _ = test_connection # Trigger registration

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/impure0xntk/mcp-wakapi'

If you have feedback or need assistance with the MCP directory API, please join our Discord server