Get Depot CI CPU and memory metrics
depot_get_ci_metricsRetrieve CPU and memory metrics for a CI run, job, or attempt to diagnose abrupt deaths, exit code 137, or slow performance by spotting OOM kills or CPU saturation.
Instructions
Read CPU and memory metrics for a Depot CI run, job, or job attempt.
Use this when a job died without a useful error, was killed abruptly, hit an exit code like 137, or is simply slow — the shapes to look for are memory sitting at its limit (an OOM kill) or CPU pinned at 100% for the whole job (under-provisioned runner).
"id" accepts a run, job, or attempt id and the level is inferred; set "level" to pick explicitly. Note that metrics for a still-running attempt grow between calls, so a snapshot time is reported.
Depot does not publish field names for these responses, so this tool returns the metrics it recognises plus the raw document (bounded) so nothing is lost. Very large metrics results are rejected by Depot itself with a resource-exhausted error — ask for a single attempt rather than a whole run if that happens.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | A run id, job id, or attempt id. | |
| level | No | Which level "id" refers to. Omit to infer; the server otherwise tries run, then job, then attempt. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| level | Yes | ||
| metrics | Yes | ||
| rawJson | Yes | Depot's metrics document as JSON text, truncated if large. | |
| likelyOom | No | ||
| rawTruncated | Yes |