health_check
Verify the SearXNG instance is running and accessible to diagnose connection issues and ensure the search service is operational before performing searches.
Instructions
Check the health status of the SearXNG instance.
This tool verifies that the SearXNG instance is running and accessible. Useful for diagnostics and ensuring the search service is operational before performing searches.
Use this when you need to:
Verify the SearXNG instance is accessible
Diagnose connection issues
Check service availability before searching
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/searxng_mcp_server/client.py:163-183 (handler)The health_check method in SearXNGClient class that executes the core logic: GET request to SearXNG /healthz endpoint and returns appropriate status dictionary.async def health_check(self) -> Dict[str, Any]: """Check the health status of the SearXNG instance. Returns: Dictionary containing health status information Raises: httpx.HTTPError: If the request fails """ url = urljoin(self.base_url, "/healthz") try: response = await self.client.get(url) response.raise_for_status() return {"status": "ok", "message": "SearXNG instance is healthy"} except httpx.HTTPError as e: return { "status": "error", "message": f"Health check failed: {str(e)}", }
- src/searxng_mcp_server/server.py:136-151 (registration)Registration of the 'health_check' tool in the MCP server's tool list, including name, description, and empty input schema (no parameters required).Tool( name="health_check", description="""Check the health status of the SearXNG instance. This tool verifies that the SearXNG instance is running and accessible. Useful for diagnostics and ensuring the search service is operational before performing searches. Use this when you need to: - Verify the SearXNG instance is accessible - Diagnose connection issues - Check service availability before searching""", inputSchema={ "type": "object", "properties": {}, }, ),
- Input schema for health_check tool: empty object since the tool takes no parameters.inputSchema={ "type": "object", "properties": {}, },