get_pipeline_details
Retrieve the complete definition of a specific AWS CodePipeline by providing its name, enabling detailed pipeline management and analysis within the MCP server environment.
Instructions
Get the full definition of a specific pipeline
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pipelineName | Yes | Name of the pipeline |
Input Schema (JSON Schema)
{
"properties": {
"pipelineName": {
"description": "Name of the pipeline",
"type": "string"
}
},
"required": [
"pipelineName"
],
"type": "object"
}
Implementation Reference
- src/tools/get_pipeline_details.ts:18-63 (handler)The handler function that executes the tool logic: fetches the pipeline details from AWS CodePipeline and formats them into a readable JSON structure for return.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), }, ], }; }
- The schema definition for the tool, specifying name, description, and input schema requiring 'pipelineName'.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)Registration of the tool handler in the CallToolRequestSchema switch statement, dispatching calls to getPipelineDetails.case "get_pipeline_details": { return await getPipelineDetails(codePipelineManager, input as { pipelineName: string; }); }
- src/index.ts:122-122 (registration)Registration of the tool schema in the ListToolsRequestSchema handler, making it discoverable.getPipelineDetailsSchema,
- src/index.ts:50-53 (registration)Import statement bringing in the handler and schema for registration.import { getPipelineDetails, getPipelineDetailsSchema } from "./tools/get_pipeline_details.js";