Skip to main content
Glama

AWS CodePipeline MCP Server

by cuongdev
approve_action.ts1.74 kB
import { CodePipelineManager } from "../types.js"; export const approveActionSchema = { name: "approve_action", description: "Approve or reject a manual approval action", inputSchema: { type: "object", properties: { pipelineName: { type: "string", description: "Name of the pipeline" }, stageName: { type: "string", description: "Name of the stage" }, actionName: { type: "string", description: "Name of the action" }, token: { type: "string", description: "Approval token" }, approved: { type: "boolean", description: "Boolean indicating approval or rejection" }, comments: { type: "string", description: "Optional comments" } }, required: ["pipelineName", "stageName", "actionName", "token", "approved"], }, } as const; export async function approveAction( codePipelineManager: CodePipelineManager, input: { pipelineName: string; stageName: string; actionName: string; token: string; approved: boolean; comments?: string; } ) { const { pipelineName, stageName, actionName, token, approved, comments } = input; const codepipeline = codePipelineManager.getCodePipeline(); await codepipeline.putApprovalResult({ pipelineName, stageName, actionName, token, result: { status: approved ? 'Approved' : 'Rejected', summary: comments || '' } }).promise(); return { content: [ { type: "text", text: JSON.stringify({ message: `Action ${approved ? 'approved' : 'rejected'} successfully` }, null, 2), }, ], }; }

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