hz_list_runs
List recent pipeline runs and their stage statuses to monitor Horizon content aggregation and analysis progress.
Instructions
列出最近运行记录与阶段状态。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No |
Implementation Reference
- horizon_mcp/server.py:291-310 (handler)Implementation and registration of the hz_list_runs tool handler.
@mcp.tool() def hz_list_runs(limit: int = 20) -> dict[str, Any]: """列出最近运行记录与阶段状态。""" started = perf_counter() try: data = service.list_runs(limit=limit) elapsed_ms = (perf_counter() - started) * 1000 _record_metrics("hz_list_runs", ok=True, duration_ms=elapsed_ms) return _ok("hz_list_runs", data, duration_ms=elapsed_ms) except Exception as exc: elapsed_ms = (perf_counter() - started) * 1000 payload = _err("hz_list_runs", exc, duration_ms=elapsed_ms) _record_metrics( "hz_list_runs", ok=False, duration_ms=elapsed_ms, error_code=payload["error"]["code"], ) return payload