report_outcome
Report API or MCP server call outcomes to contribute to community reliability ratings. Submit success, error, timeout, or unexpected results with latency and error details.
Instructions
Leave a review — report the outcome of an API or MCP server call you just made. Like writing a TrustPilot review, your report contributes to the community reliability rating for that service.
The more agents that report, the more accurate the ratings become for everyone.
Args: service: Service slug that was called outcome: Result — 'success', 'error', 'timeout', or 'unexpected' latency_ms: Response time in milliseconds (if available) error_type: If outcome was 'error', the category: 'auth', 'rate_limit', 'server', 'network', 'parse', 'other'
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| service | Yes | ||
| outcome | Yes | ||
| latency_ms | No | ||
| error_type | No |
Implementation Reference
- src/preflight_mcp/__init__.py:118-169 (handler)The 'report_outcome' tool is defined as an asynchronous function decorated with @mcp.tool. It takes service information, outcome, latency, and error details, and sends a POST request to the Preflight API to record the report.
@mcp.tool async def report_outcome( service: str, outcome: str, latency_ms: int | None = None, error_type: str | None = None, ) -> dict: """Leave a review — report the outcome of an API or MCP server call you just made. Like writing a TrustPilot review, your report contributes to the community reliability rating for that service. The more agents that report, the more accurate the ratings become for everyone. Args: service: Service slug that was called outcome: Result — 'success', 'error', 'timeout', or 'unexpected' latency_ms: Response time in milliseconds (if available) error_type: If outcome was 'error', the category: 'auth', 'rate_limit', 'server', 'network', 'parse', 'other' """ payload = {"service": service, "outcome": outcome} if latency_ms is not None: payload["latency_ms"] = latency_ms if error_type is not None: payload["error_type"] = error_type try: async with httpx.AsyncClient(timeout=10) as client: resp = await client.post( f"{PREFLIGHT_API}/v1/report", json=payload, 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}", }