get_pipeline_details
Retrieve the complete configuration and definition of an AWS CodePipeline to understand its structure, stages, and actions for troubleshooting or analysis.
Instructions
Get the full definition of a specific pipeline
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pipelineName | Yes | Name of the pipeline |
Implementation Reference
- src/tools/get_pipeline_details.ts:18-63 (handler)The main handler function that fetches and formats the details of a specified AWS CodePipeline pipeline using the AWS SDK.export async function getPipelineDetails( codePipelineManager: CodePipelineManager, input: { pipelineName: string } ) { const { pipelineName } = input; const codepipeline = codePipelineManager.getCodePipeline(); const response = await codepipeline.getPipeline({ name: pipelineName }).promise(); // Format the pipeline details for better readability const pipelineDetails = { pipeline: { name: response.pipeline?.name || '', roleArn: response.pipeline?.roleArn || '', artifactStore: response.pipeline?.artifactStore, stages: response.pipeline?.stages?.map(stage => ({ name: stage.name, actions: stage.actions?.map(action => ({ name: action.name, actionTypeId: action.actionTypeId, runOrder: action.runOrder, configuration: action.configuration, outputArtifacts: action.outputArtifacts, inputArtifacts: action.inputArtifacts, region: action.region, namespace: action.namespace })) })), version: response.pipeline?.version || 0, metadata: { created: response.metadata?.created?.toISOString() || '', updated: response.metadata?.updated?.toISOString() || '', pipelineArn: response.metadata?.pipelineArn || '' } } }; return { content: [ { type: "text", text: JSON.stringify(pipelineDetails, null, 2), }, ], }; }
- Schema definition for the get_pipeline_details tool, including name, description, and input validation structure.export const getPipelineDetailsSchema = { name: "get_pipeline_details", description: "Get the full definition of a specific pipeline", inputSchema: { type: "object", properties: { pipelineName: { type: "string", description: "Name of the pipeline" } }, required: ["pipelineName"], }, } as const;
- src/index.ts:189-193 (registration)Dispatch logic in the MCP server's CallToolRequestHandler switch statement that routes tool calls to the getPipelineDetails handler.case "get_pipeline_details": { return await getPipelineDetails(codePipelineManager, input as { pipelineName: string; }); }
- src/index.ts:121-122 (registration)Registration of the tool schema in the list of available tools returned by the ListToolsRequestHandler.// Add new tool schemas getPipelineDetailsSchema,
- src/index.ts:50-53 (registration)Import statement in the main server file that loads the tool handler and schema.import { getPipelineDetails, getPipelineDetailsSchema } from "./tools/get_pipeline_details.js";