Skip to main content
Glama
cuongdev

AWS CodePipeline MCP Server

by cuongdev

stop_pipeline_execution

Stop an AWS CodePipeline execution by providing the pipeline name and execution ID to halt ongoing deployments or processes.

Instructions

Stop a pipeline execution

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pipelineNameYesName of the pipeline
executionIdYesExecution ID
reasonNoOptional reason for stopping

Implementation Reference

  • The core handler function that implements the stop_pipeline_execution MCP tool by invoking the AWS CodePipeline SDK to stop the specified pipeline execution and returning a success message.
    export async function stopPipelineExecution(
      codePipelineManager: CodePipelineManager, 
      input: {
        pipelineName: string;
        executionId: string;
        reason?: string;
      }
    ) {
      const { pipelineName, executionId, reason } = input;
      const codepipeline = codePipelineManager.getCodePipeline();
      
      await codepipeline.stopPipelineExecution({
        pipelineName,
        pipelineExecutionId: executionId,
        reason: reason || 'Stopped by user',
        abandon: false
      }).promise();
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({ 
              message: "Pipeline execution stopped successfully" 
            }, null, 2),
          },
        ],
      };
    }
  • The schema definition for the stop_pipeline_execution tool, specifying input parameters and requirements.
    export const stopPipelineExecutionSchema = {
      name: "stop_pipeline_execution",
      description: "Stop a pipeline execution",
      inputSchema: {
        type: "object",
        properties: {
          pipelineName: { 
            type: "string",
            description: "Name of the pipeline"
          },
          executionId: { 
            type: "string",
            description: "Execution ID"
          },
          reason: { 
            type: "string",
            description: "Optional reason for stopping"
          }
        },
        required: ["pipelineName", "executionId"],
      },
    } as const;
  • src/index.ts:45-47 (registration)
    Import statement bringing in the handler function and schema for the stop_pipeline_execution tool.
      stopPipelineExecution, 
      stopPipelineExecutionSchema 
    } from "./tools/stop_pipeline_execution.js";
  • src/index.ts:112-126 (registration)
    Registration of the stopPipelineExecutionSchema in the array of tools advertised by the MCP server's ListTools handler.
    tools: [
      listPipelinesSchema,
      getPipelineStateSchema,
      listPipelineExecutionsSchema,
      approveActionSchema,
      retryStageSchema,
      triggerPipelineSchema,
      getPipelineExecutionLogsSchema,
      stopPipelineExecutionSchema,
      // Add new tool schemas
      getPipelineDetailsSchema,
      tagPipelineResourceSchema,
      createPipelineWebhookSchema,
      getPipelineMetricsSchema,
    ],
  • src/index.ts:180-186 (registration)
    The switch case in the MCP CallToolRequestHandler that dispatches tool calls named 'stop_pipeline_execution' to the imported handler function.
    case "stop_pipeline_execution": {
      return await stopPipelineExecution(codePipelineManager, input as {
        pipelineName: string;
        executionId: string;
        reason?: string;
      });
    }
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. 'Stop a pipeline execution' implies a destructive mutation, but it doesn't specify whether this action is reversible, requires specific permissions, has side effects, or provides confirmation of success. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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, efficient sentence with zero waste. It's appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration, making it easy to parse quickly.

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 a destructive mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits, return values, error handling, or how it fits with sibling tools. For a tool that stops executions, more context is needed to ensure safe and correct usage.

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?

Schema description coverage is 100%, with all parameters clearly documented in the input schema. The description doesn't add any meaning beyond what the schema provides, such as explaining parameter relationships or usage nuances. With high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.

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 'Stop a pipeline execution' clearly states the action (stop) and target resource (pipeline execution) with a specific verb. However, it doesn't distinguish this tool from potential alternatives like 'retry_stage' or 'get_pipeline_state' among the sibling tools, which would require more specific 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. With sibling tools like 'retry_stage' and 'get_pipeline_state' available, there's no indication of when stopping is appropriate versus retrying or checking state, nor any prerequisites or exclusions mentioned.

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