Skip to main content
Glama
Azure DevOps MCP Server

Azure DevOps MCP Server

retry_pipeline_stage

Destructive

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

NameRequiredDescriptionDefault
runIdNoPipeline run (build) ID. Alternatively provide buildNumber together with pipelineName or pipelineId
stateNoStage update action: "retry" (default, retries a failed/completed stage), "cancel" (cancels an in-progress stage), or "run" (runs a manual/deferred stage).
projectIdNoThe ID or name of the project (defaults to AZURE_DEVOPS_DEFAULT_PROJECT)
pipelineIdNoOptional pipeline numeric ID; scopes buildNumber lookups
buildNumberNoBuild 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.
pipelineNameNoPipeline (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).
stageRefNameYesReference name (identifier) of the pipeline stage to update (e.g. "Test", "Build", "Deploy")
forceRetryAllJobsNoWhen retrying a stage, set true to re-run all jobs including previously succeeded jobs; false (default) retries only failed or canceled jobs.
retryDependenciesNoOptional flag controlling whether dependent downstream stages are also retried. Only sent when explicitly specified.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.13

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false, so the safety profile is carried structurally. The description adds genuine context the annotations do not: a version floor for the server product line and the dual run-identification scheme. It does not say what a cancel does to in-flight jobs, whether a retry discards prior logs, or what permissions are needed — meaningful gaps for a destructive mutation.

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?

Two sentences, zero filler. The action and scope come first and the prerequisite plus identification rule follow, which is the right order for an agent deciding whether it can call this at all.

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

Completeness4/5

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

For a 9-parameter destructive mutation with full schema coverage and no output schema, the description covers the two things the schema cannot: environment compatibility and how to disambiguate the target run. It stops short of describing the observable result of each action or permission requirements, which an agent would still want before cancelling a live stage.

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

Parameters3/5

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

Schema coverage is 100% and each parameter already documents itself, including the state enum and the runId-versus-buildNumber tradeoff, so the schema does the heavy lifting. The description's sentence about identifying the run largely restates the runId parameter's own description rather than adding syntax or constraints. Baseline 3 is appropriate.

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

Purpose4/5

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

The description opens with a specific verb set and resource: 'Retry, cancel, or run a specific stage in a pipeline run.' That is unambiguous and stage-level scope distinguishes it from run-level siblings such as trigger_pipeline and get_pipeline_run. It does not explicitly name a sibling to route away from, which keeps it short of a 5.

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

Usage Guidelines3/5

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

It supplies prerequisites ('Requires Azure DevOps Server 2020+ or Azure DevOps Services') and two alternative ways to identify the run (runId, or pipelineName/pipelineId plus buildNumber). What is missing is when-to-use-versus-alternatives guidance — e.g. when to retry here instead of re-triggering with trigger_pipeline, or that cancel is the path for an in-progress stage rather than a failed one.

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