Skip to main content
Glama
cuongdev
by cuongdev

retry_stage

Retry a failed stage in AWS CodePipeline by specifying the pipeline name, stage name, and execution ID. Simplifies pipeline management and reduces manual intervention.

Instructions

Retry a failed stage

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pipelineExecutionIdYesExecution ID
pipelineNameYesName of the pipeline
stageNameYesName of the stage

Implementation Reference

  • The core handler function for the MCP 'retry_stage' tool that uses AWS SDK to retry a failed stage in CodePipeline.
    export async function retryStage( codePipelineManager: CodePipelineManager, input: { pipelineName: string; stageName: string; pipelineExecutionId: string; } ) { const { pipelineName, stageName, pipelineExecutionId } = input; const codepipeline = codePipelineManager.getCodePipeline(); await codepipeline.retryStageExecution({ pipelineName, stageName, pipelineExecutionId, retryMode: 'FAILED_ACTIONS' }).promise(); return { content: [ { type: "text", text: JSON.stringify({ message: "Stage retry initiated successfully" }, null, 2), }, ], }; }
  • Input schema definition for the 'retry_stage' MCP tool, specifying required parameters.
    export const retryStageSchema = { name: "retry_stage", description: "Retry a failed stage", inputSchema: { type: "object", properties: { pipelineName: { type: "string", description: "Name of the pipeline" }, stageName: { type: "string", description: "Name of the stage" }, pipelineExecutionId: { type: "string", description: "Execution ID" } }, required: ["pipelineName", "stageName", "pipelineExecutionId"], }, } as const;
  • src/index.ts:159-165 (registration)
    Dispatch/registration of the 'retry_stage' handler within the MCP CallToolRequestHandler switch case.
    case "retry_stage": { return await retryStage(codePipelineManager, input as { pipelineName: string; stageName: string; pipelineExecutionId: string; }); }
  • src/index.ts:117-117 (registration)
    Inclusion of 'retryStageSchema' in the listTools response for tool discovery.
    retryStageSchema,

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cuongdev/mcp-codepipeline-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server