Skip to main content
Glama
cuongdev

AWS CodePipeline MCP Server

by cuongdev

get_pipeline_execution_logs

Retrieve execution logs for AWS CodePipeline to monitor pipeline runs and troubleshoot issues by specifying pipeline name and execution ID.

Instructions

Get logs for a pipeline execution

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pipelineNameYesName of the pipeline
executionIdYesExecution ID

Implementation Reference

  • The main handler function for the 'get_pipeline_execution_logs' MCP tool. Fetches pipeline execution details from AWS CodePipeline via CodePipelineManager and formats the response as MCP content.
    export async function getPipelineExecutionLogs(
      codePipelineManager: CodePipelineManager, 
      input: {
        pipelineName: string;
        executionId: string;
      }
    ) {
      const { pipelineName, executionId } = input;
      const codepipeline = codePipelineManager.getCodePipeline();
      
      const response = await codepipeline.getPipelineExecution({
        pipelineName,
        pipelineExecutionId: executionId
      }).promise();
    
      // Format the response for better readability
      // Extract and format the execution details
      const logs = {
        pipelineName: response.pipelineExecution?.pipelineName || pipelineName,
        pipelineVersion: response.pipelineExecution?.pipelineVersion || '1',
        pipelineExecution: {
          pipelineExecutionId: response.pipelineExecution?.pipelineExecutionId,
          status: response.pipelineExecution?.status,
          artifactRevisions: response.pipelineExecution?.artifactRevisions?.map((revision: AWS.CodePipeline.ArtifactRevision) => ({
            name: revision.name,
            revisionId: revision.revisionId,
            revisionSummary: revision.revisionSummary,
            revisionUrl: revision.revisionUrl
          }))
        }
      };
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({ logs }, null, 2),
          },
        ],
      };
    }
  • The schema definition for the 'get_pipeline_execution_logs' tool, including name, description, and input schema validation.
    export const getPipelineExecutionLogsSchema = {
      name: "get_pipeline_execution_logs",
      description: "Get logs for a pipeline execution",
      inputSchema: {
        type: "object",
        properties: {
          pipelineName: { 
            type: "string",
            description: "Name of the pipeline"
          },
          executionId: { 
            type: "string",
            description: "Execution ID"
          }
        },
        required: ["pipelineName", "executionId"],
      },
    } as const;
  • src/index.ts:173-178 (registration)
    Registration and dispatch handler in the MCP server's CallToolRequest handler switch statement, which calls the tool handler function.
    case "get_pipeline_execution_logs": {
      return await getPipelineExecutionLogs(codePipelineManager, input as {
        pipelineName: string;
        executionId: string;
      });
    }
  • src/index.ts:119-119 (registration)
    Registration of the tool schema in the ListToolsRequest handler response.
    getPipelineExecutionLogsSchema,
  • src/index.ts:40-42 (registration)
    Import statement registering the handler and schema for use in the MCP server.
      getPipelineExecutionLogs, 
      getPipelineExecutionLogsSchema 
    } from "./tools/get_pipeline_execution_logs.js";
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states what the tool does but doesn't cover important aspects like whether logs are real-time/historical, format (text/structured), size limits, pagination, or authentication requirements. This leaves significant gaps for a log retrieval tool.

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 that communicates the core purpose without any wasted words. It's appropriately sized for a straightforward tool and gets directly to the point.

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 no annotations and no output schema, the description is insufficiently complete. It doesn't explain what the logs contain, their format, or any limitations. For a tool that retrieves potentially complex execution logs, more context about the return value would be helpful.

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 both parameters clearly documented. The description doesn't add any additional parameter semantics beyond what the schema provides, so it meets the baseline for adequate but unenhanced parameter documentation.

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 ('logs for a pipeline execution'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_pipeline_details' or 'list_pipeline_executions' beyond the specific resource type, which prevents a perfect score.

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, timing considerations, or how it differs from other pipeline-related tools in the sibling list, leaving the agent to infer usage context.

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