retry_pipeline_stage
Target a specific Azure DevOps pipeline stage to retry failed jobs, cancel an in-progress stage, or run a deferred stage using a run ID or pipeline name and build number.
Instructions
Retry, cancel, or run a specific stage in a pipeline run. Requires Azure DevOps Server 2020+ or Azure DevOps Services. The run can be identified by runId or by pipelineName (or pipelineId) plus buildNumber.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"stageRefName": "<stageRefName>"
},
"name": "retry_pipeline_stage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runId | No | Pipeline run (build) ID. Alternatively provide buildNumber together with pipelineName or pipelineId | |
| state | No | Stage update action: "retry" (default, retries a failed/completed stage), "cancel" (cancels an in-progress stage), or "run" (runs a manual/deferred stage). | |
| projectId | No | The ID or name of the project (defaults to AZURE_DEVOPS_DEFAULT_PROJECT) | |
| pipelineId | No | Optional pipeline numeric ID; scopes buildNumber lookups | |
| buildNumber | No | Build number / run name as shown in the Azure DevOps UI (e.g. "20240115.3"). Alternative to runId; combine with pipelineName or pipelineId to make it unambiguous. | |
| pipelineName | No | Pipeline (build definition) name, as shown in the Azure DevOps UI. Alternative to pipelineId. Prefix it with its folder path to disambiguate pipelines that share a name (e.g. "Backend/Deploy"; "/Deploy" for the root folder). | |
| stageRefName | Yes | Reference name (identifier) of the pipeline stage to update (e.g. "Test", "Build", "Deploy") | |
| forceRetryAllJobs | No | When retrying a stage, set true to re-run all jobs including previously succeeded jobs; false (default) retries only failed or canceled jobs. | |
| retryDependencies | No | Optional flag controlling whether dependent downstream stages are also retried. Only sent when explicitly specified. |