Skip to main content
Glama

Wait for a Depot CI run or workflow to finish

depot_wait_for_ci_run
Read-onlyIdempotent

Wait for a Depot CI run or workflow to reach a terminal state, then report the outcome and node changes. Polls until completion, timeout, or a specified job finishes.

Instructions

Wait, for a bounded time, until a Depot CI run, one workflow in it, or one job reaches a terminal state, then report the outcome and which nodes changed state while waiting.

Use this after a push or a rerun when the next step depends on the result: "wait for the run to finish, then diagnose it if it failed". Pass runId to watch a whole run. Pass workflowId to watch one workflow: this is what to do after depot_rerun_ci_workflow or depot_retry_ci_failed_jobs, which start a new execution of the same workflow rather than a new run; the wait ends when the latest execution is terminal. With both ids the workflow is watched and must belong to that run. Pass untilJobKey to return as soon as one job is done instead of the whole target, for example the test job when the deploy job behind it does not matter yet.

This is bounded polling, not a stream. It calls GetRunStatus (or GetWorkflow) every pollSeconds until the target is finished, failed, or cancelled, or until timeoutSeconds is spent, whichever comes first, then returns. It never subscribes to Depot's log or status streams. If the result says timedOut=true the target is still going: call this tool again with the same id to keep waiting; the changes list shows what moved in the meantime. Keep timeoutSeconds below your MCP client's own tool-call timeout, or the client will give up before this tool does.

A run or workflow that is already finished returns immediately after one poll, so this is also a cheap way to check "is it done yet". For the structure use depot_get_ci_run or depot_get_ci_workflow; for why it failed use depot_diagnose_ci_failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
runIdNoThe run id to wait on, as returned by depot_list_ci_runs. Required unless workflowId is given; with workflowId it is only cross-checked.
workflowIdNoWait for this workflow instead of a whole run, as shown by depot_get_ci_run (workflowId=...) or returned by depot_rerun_ci_workflow. The wait ends when its latest execution is terminal.
pollSecondsNoSeconds between status requests, 2 to 30. Each poll is one request to Depot; lower values give faster answers at the cost of more requests.
untilJobKeyNoReturn as soon as this job reaches a terminal state, even if the run or workflow is still going. Accepts the job key, display name, or job id as shown by depot_get_ci_run.
timeoutSecondsNoLongest this call may wait, 5 to 300 seconds. On expiry the tool returns timedOut=true rather than an error; call again to keep waiting.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobNoThe job named by untilJobKey, when it was found.
notesYes
pollsYes
runIdNo
failedYesTrue when the target ended in failed or cancelled.
statusNoStatus of the watched run, or of the latest execution of the watched workflow, at the last poll.
changesYesNodes whose state differs between the first and last poll.
outcomeYesWhy the wait ended: the run finished, the workflow (its latest execution) finished, the named job finished, or the timeout expired.
jobCountYes
timedOutYes
executionNoWhen watching a workflow: which execution the wait followed.
workflowIdNoPresent when a workflow was watched.
pollSecondsYes
initialStatusNoThe same status at the first poll.
elapsedSecondsYes
failedJobCountYes
timeoutSecondsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.1

TDQS

A5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description reveals key behavioral traits beyond annotations: it is bounded polling, not a stream; it calls GetRunStatus/GetWorkflow each poll; it returns timedOut=true rather than erroring; it can be re-invoked to keep waiting; and it returns immediately for already-finished targets. This matches the readOnlyHint and idempotentHint annotations without contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but densely informative; each paragraph covers a distinct aspect: use case, polling mechanics and timeout behavior, and sibling-tool routing. It front-loads the purpose and keeps practical caveats like MCP client timeout near the relevant mechanics.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex polling tool with optional-looking parameters, the description fully explains the id constraints, poll/timeout ranges, terminal states, repeated-call behavior, and cheap 'is it done yet' usage. With an output schema present and all parameter semantics covered, nothing essential is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and each parameter already has a rich schema description, but the tool description adds crucial cross-parameter semantics: runId is required unless workflowId is given, workflowId waits for the latest execution, and untilJobKey accepts job key, display name, or id. This goes well beyond the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('wait'), resource ('Depot CI run, workflow, or job'), and outcome ('report outcome and changed nodes'). It also distinguishes itself from sibling tools by naming depot_get_ci_run, depot_diagnose_ci_failure, depot_rerun_ci_workflow, and depot_retry_ci_failed_jobs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit when-to-use guidance ('after a push or a rerun when the next step depends on the result') and clear alternatives ('For structure use depot_get_ci_run... for why it failed use depot_diagnose_ci_failure'). It also explains when to pass workflowId vs runId and when untilJobKey is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.