Skip to main content
Glama
hekmon8

Jenkins Server MCP

by hekmon8

get_build_status

Retrieve the current status of a Jenkins build by providing the job path and build number. Use 'lastBuild' to fetch the most recent build's status.

Instructions

Get the status of a Jenkins build

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
buildNumberNoBuild number (use "lastBuild" for most recent)
jobPathYesPath to the Jenkins job (e.g., "view/xxx_debug")

Implementation Reference

  • The handler function that executes the get_build_status tool: fetches build status from Jenkins API using axios and returns formatted JSON content.
    private async getBuildStatus(args: any) {
      const buildNumber = args.buildNumber || 'lastBuild';
      const response = await this.axiosInstance.get<BuildStatus>(
        `/${args.jobPath}/${buildNumber}/api/json`
      );
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              building: response.data.building,
              result: response.data.result,
              timestamp: response.data.timestamp,
              duration: response.data.duration,
              url: response.data.url,
            }, null, 2),
          },
        ],
      };
    }
  • src/index.ts:62-79 (registration)
    Tool registration in the ListTools handler, defining name, description, and input schema.
    {
      name: 'get_build_status',
      description: 'Get the status of a Jenkins build',
      inputSchema: {
        type: 'object',
        properties: {
          jobPath: {
            type: 'string',
            description: 'Path to the Jenkins job (e.g., "view/xxx_debug")',
          },
          buildNumber: {
            type: 'string',
            description: 'Build number (use "lastBuild" for most recent)',
          },
        },
        required: ['jobPath'],
      },
    },
  • TypeScript interface defining the structure of the Jenkins build status response used in the handler.
    interface BuildStatus {
      building: boolean;
      result: string | null;
      timestamp: number;
      duration: number;
      url: string;
    }
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. It states the tool retrieves status but doesn't add any context beyond that—no information about authentication needs, rate limits, error handling, or what the status response entails (e.g., success/failure, duration). This leaves significant gaps in understanding how the tool behaves in practice.

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 directly states the tool's purpose without any fluff or redundancy. It's appropriately sized and front-loaded, making it easy to parse quickly. Every word earns its place by conveying essential information.

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 build status tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the status output includes (e.g., success indicators, timestamps) or any behavioral nuances like error cases. For a tool that likely returns structured status data, this lack of context leaves the agent under-informed.

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 clear explanations for both parameters (e.g., 'buildNumber' can use 'lastBuild' for most recent, 'jobPath' specifies the path). The description adds no additional meaning beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage without compensating value.

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 action ('Get') and resource ('status of a Jenkins build'), making the tool's purpose immediately understandable. It distinguishes itself from sibling tools like 'get_build_log' (which retrieves logs) and 'trigger_build' (which initiates builds). However, it doesn't explicitly mention the verb+resource combination in a way that highlights sibling differentiation beyond the obvious.

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 scenarios where this tool is preferred over 'get_build_log' for status checks or 'trigger_build' for initiating actions. There's no context about prerequisites, such as needing a valid job path or build number, leaving usage entirely implicit.

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