healthcheck_flow
Check the operational status of the Approved Platform's Flow Service before submitting invoices. Returns ok, degraded, or unavailable.
Instructions
Check the availability of the Approved Platform's Flow Service. Returns the operational status of the service (ok/degraded/unavailable). Use before an invoice submission session to ensure the AP is reachable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- tools/flow_tools.py:442-450 (handler)The MCP tool handler for 'healthcheck_flow'. Calls get_flow_client() and then client.healthcheck() to check AP Flow Service availability.
@mcp.tool() async def healthcheck_flow() -> dict: """ Check the availability of the Approved Platform's Flow Service. Returns the operational status of the service (ok/degraded/unavailable). Use before an invoice submission session to ensure the AP is reachable. """ client = get_flow_client() return await client.healthcheck() - clients/flow_client.py:191-197 (helper)The HTTP client method (FlowClient.healthcheck) that performs the actual GET /v1/healthcheck request to the Approved Platform.
async def healthcheck(self) -> dict[str, Any]: """GET /v1/healthcheck — Check Flow Service availability.""" response = await self._request("GET", "/v1/healthcheck") try: return response.json() except Exception: return {"status": "ok", "http_status": response.status_code} - tools/flow_tools.py:442-451 (registration)The tool is registered via the @mcp.tool() decorator in register_flow_tools(), which is called from server.py line 74.
@mcp.tool() async def healthcheck_flow() -> dict: """ Check the availability of the Approved Platform's Flow Service. Returns the operational status of the service (ok/degraded/unavailable). Use before an invoice submission session to ensure the AP is reachable. """ client = get_flow_client() return await client.healthcheck() - tools/flow_tools.py:43-47 (helper)Singleton helper that creates and caches the FlowClient instance used by healthcheck_flow.
def get_flow_client() -> FlowClient: global _flow_client if _flow_client is None: _flow_client = FlowClient() return _flow_client