compare_services
Compare reliability ratings across multiple services to identify providers with the best track record for uptime, latency, and real-world reliability.
Instructions
Compare reliability ratings across multiple services side by side. Like reading comparative reviews — see which provider has the best track record for uptime, latency, and real-world reliability right now.
Returns services ranked by the chosen metric with a recommendation and the reasoning behind it.
Args: services: List of service slugs to compare (max 10) sort_by: Metric to sort by — 'overall', 'uptime', 'latency', 'reliability'
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| services | Yes | ||
| sort_by | No | overall |
Implementation Reference
- src/preflight_mcp/__init__.py:76-115 (handler)The 'compare_services' tool implementation, which fetches comparative reliability ratings from the Preflight API.
@mcp.tool async def compare_services( services: list[str], sort_by: str = "overall", ) -> dict: """Compare reliability ratings across multiple services side by side. Like reading comparative reviews — see which provider has the best track record for uptime, latency, and real-world reliability right now. Returns services ranked by the chosen metric with a recommendation and the reasoning behind it. Args: services: List of service slugs to compare (max 10) sort_by: Metric to sort by — 'overall', 'uptime', 'latency', 'reliability' """ try: async with httpx.AsyncClient(timeout=10) as client: resp = await client.get( f"{PREFLIGHT_API}/v1/compare", params={"services": ",".join(services), "sort_by": sort_by}, headers=_headers(), ) resp.raise_for_status() return resp.json() except httpx.HTTPStatusError as exc: return { "error": True, "status_code": exc.response.status_code, "detail": exc.response.text, } except (httpx.ConnectError, httpx.TimeoutException) as exc: return { "error": True, "status_code": None, "detail": f"Connection failed: {exc}", }