Skip to main content
Glama
cuongdev

AWS CodePipeline MCP Server

by cuongdev

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

Implementation Reference

  • 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),
          },
        ],
      };
    }
  • 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";
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. 'Trigger a pipeline execution' implies a write/mutation operation, but it doesn't specify permissions required, whether it's idempotent, rate limits, or what happens on success/failure. This leaves significant gaps for an agent to understand the tool's behavior.

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 zero wasted words. It's appropriately sized for a simple tool and front-loaded with the essential action, making it highly efficient.

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 complexity of triggering a pipeline (a mutation with no annotations or output schema), the description is incomplete. It doesn't explain what 'trigger' entails (e.g., starts execution, may have side effects), expected outcomes, or error conditions, leaving the agent with insufficient context.

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 input schema has 100% description coverage, with the single parameter 'pipelineName' documented in the schema. The description adds no additional meaning about parameters beyond what the schema provides, so it meets the baseline of 3 for high schema coverage.

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 ('trigger') and resource ('pipeline execution'), making the purpose immediately understandable. However, it doesn't distinguish this from sibling tools like 'retry_stage' or 'stop_pipeline_execution' that also affect pipeline execution, so it lacks sibling differentiation.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., pipeline must exist), exclusions (e.g., cannot trigger if already running), or comparisons to siblings like 'retry_stage' or 'create_pipeline_webhook'.

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