Skip to main content
Glama
hekmon8

Jenkins Server MCP

by hekmon8

get_build_log

Retrieve the console output of a Jenkins build by specifying the job path and build number. Use to monitor build details and debug CI/CD pipelines efficiently.

Instructions

Get the console output of a Jenkins build

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
buildNumberYesBuild number (use "lastBuild" for most recent)
jobPathYesPath to the Jenkins job

Implementation Reference

  • The main handler function that fetches the console log from Jenkins API endpoint `/{jobPath}/{buildNumber}/consoleText` using axios and returns it as MCP tool response content.
    private async getBuildLog(args: any) {
      const response = await this.axiosInstance.get(
        `/${args.jobPath}/${args.buildNumber}/consoleText`
      );
    
      return {
        content: [
          {
            type: 'text',
            text: response.data,
          },
        ],
      };
    }
  • src/index.ts:99-116 (registration)
    Registers the 'get_build_log' tool in the MCP server's ListTools response, including name, description, and input schema.
    {
      name: 'get_build_log',
      description: 'Get the console output of a Jenkins build',
      inputSchema: {
        type: 'object',
        properties: {
          jobPath: {
            type: 'string',
            description: 'Path to the Jenkins job',
          },
          buildNumber: {
            type: 'string',
            description: 'Build number (use "lastBuild" for most recent)',
          },
        },
        required: ['jobPath', 'buildNumber'],
      },
    },
  • Input schema definition for the get_build_log tool, specifying required jobPath and optional buildNumber parameters.
    inputSchema: {
      type: 'object',
      properties: {
        jobPath: {
          type: 'string',
          description: 'Path to the Jenkins job',
        },
        buildNumber: {
          type: 'string',
          description: 'Build number (use "lastBuild" for most recent)',
        },
      },
      required: ['jobPath', 'buildNumber'],
    },
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 add context beyond that—e.g., it doesn't mention authentication needs, rate limits, error handling, or what 'console output' entails (e.g., log format, size limits). For a tool with no annotations, 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: 'Get the console output of a Jenkins build.' It's front-loaded with the core purpose, has zero waste, and is appropriately sized for a simple tool. Every word earns its place, making it highly concise and well-structured.

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

Completeness3/5

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

Given the tool's complexity (simple read operation with 2 parameters) and the absence of annotations and output schema, the description is minimally adequate. It states what the tool does but lacks details on behavior, usage context, or output format. It meets the basic requirement but has clear gaps, especially in behavioral transparency and guidelines.

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 both parameters ('buildNumber' and 'jobPath') well-documented in the schema (e.g., 'use "lastBuild" for most recent'). The description doesn't add any parameter-specific details beyond what the schema provides. According to the rules, with high schema coverage (>80%), the baseline is 3, 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 clearly states the tool's purpose: 'Get the console output of a Jenkins build.' It specifies the verb ('Get') and resource ('console output of a Jenkins build'), making it understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_build_status' (which might return status metadata rather than console output), so it misses full sibling distinction.

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 sibling tools like 'get_build_status' or 'trigger_build,' nor does it specify prerequisites, contexts, or exclusions for usage. This lack of comparative or contextual advice limits its helpfulness for an AI agent.

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

Related 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/hekmon8/Jenkins-server-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server