trigger_pipeline
Start a pipeline execution in AWS CodePipeline to automate software release processes and deployments.
Instructions
Trigger a pipeline execution
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pipelineName | Yes | Name of the pipeline |
Implementation Reference
- src/tools/trigger_pipeline.ts:18-44 (handler)The main handler function that implements the trigger_pipeline MCP tool logic, triggering AWS CodePipeline execution and returning the execution ID.export async function triggerPipeline( codePipelineManager: CodePipelineManager, input: { pipelineName: string; } ) { const { pipelineName } = input; const codepipeline = codePipelineManager.getCodePipeline(); const response = await codepipeline.startPipelineExecution({ name: pipelineName }).promise(); const executionId = response.pipelineExecutionId || ''; return { content: [ { type: "text", text: JSON.stringify({ message: "Pipeline triggered successfully", executionId }, null, 2), }, ], }; }
- src/tools/trigger_pipeline.ts:3-16 (schema)Defines the input schema and metadata for the trigger_pipeline MCP tool.export const triggerPipelineSchema = { name: "trigger_pipeline", description: "Trigger a pipeline execution", inputSchema: { type: "object", properties: { pipelineName: { type: "string", description: "Name of the pipeline" } }, required: ["pipelineName"], }, } as const;
- src/index.ts:167-171 (registration)Registers the trigger_pipeline tool in the MCP server's CallToolRequestHandler by dispatching to the triggerPipeline handler function.case "trigger_pipeline": { return await triggerPipeline(codePipelineManager, input as { pipelineName: string; }); }
- src/index.ts:118-118 (registration)Includes the triggerPipelineSchema in the list of available tools returned by ListToolsRequestHandler.triggerPipelineSchema,
- src/index.ts:35-37 (registration)Imports the triggerPipeline handler and triggerPipelineSchema from the tool module.triggerPipeline, triggerPipelineSchema } from "./tools/trigger_pipeline.js";