Skip to main content
Glama
cuongdev

AWS CodePipeline MCP Server

by cuongdev

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
NameRequiredDescriptionDefault
pipelineNameYesName of the pipeline

Implementation Reference

  • 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";
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Get') but doesn't describe whether this is a read-only operation, what permissions are required, how errors are handled, or the format of the returned definition. This leaves significant gaps for a tool that retrieves data.

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?

The description is a single, clear sentence with no wasted words. It is front-loaded with the core action and resource, making it efficient and easy to parse.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the 'full definition' includes (e.g., configuration, stages, variables) or the response format, which is critical for a tool that retrieves detailed information. This leaves the agent with insufficient context to use the tool effectively.

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?

The schema description coverage is 100%, with the parameter 'pipelineName' fully documented in the schema. The description doesn't add any semantic details beyond what the schema provides, such as examples or constraints on the pipeline name. With high schema coverage, the baseline score of 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 clearly states the verb ('Get') and resource ('full definition of a specific pipeline'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_pipeline_state' or 'get_pipeline_metrics', which also retrieve pipeline information but focus on different aspects.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention when this tool is appropriate compared to siblings like 'list_pipelines' (for overview) or 'get_pipeline_state' (for status), nor does it specify prerequisites or exclusions.

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

Install Server

Other 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