Skip to main content
Glama
kjozsa
by kjozsa

get_build_status

Check Jenkins job build status and details by specifying job name and optional build number to monitor pipeline execution.

Instructions

Get build status

Args:
    job_name: Name of the job
    build_number: Build number to check, defaults to latest

Returns:
    Build information dictionary

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_nameYes
build_numberNo

Implementation Reference

  • The handler function implementing the 'get_build_status' tool logic. It fetches the Jenkins client from context, determines the build number if not provided by getting the last build from job info, and returns the build information using the Jenkins library. The @mcp.tool() decorator registers this function as an MCP tool.
    @mcp.tool()
    def get_build_status(
        ctx: Context, job_name: str, build_number: Optional[int] = None
    ) -> dict:
        """Get build status
    
        Args:
            job_name: Name of the job
            build_number: Build number to check, defaults to latest
    
        Returns:
            Build information dictionary
        """
        client = ctx.request_context.lifespan_context.client
        if build_number is None:
            build_number = client.get_job_info(job_name)["lastBuild"]["number"]
        return client.get_build_info(job_name, build_number)
Behavior2/5

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

With no annotations provided, the description carries full burden of behavioral disclosure. It states this is a read operation ('Get'), but doesn't describe what 'Build information dictionary' contains, whether there are rate limits, authentication requirements, error conditions, or how 'latest' is determined when build_number is null. The return format is mentioned but not detailed.

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 perfectly structured and concise: purpose statement followed by Args and Returns sections. Every sentence earns its place - no redundant information, well-organized, and front-loaded with the core functionality.

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?

For a 2-parameter read tool with no annotations and no output schema, the description provides basic but incomplete context. It covers the purpose and parameters adequately, but lacks details about the return value format, error handling, system context, or integration with sibling tools. The absence of output schema means the description should ideally explain the return structure more thoroughly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It clearly explains both parameters: 'job_name' as 'Name of the job' and 'build_number' with its default behavior ('defaults to latest'). This adds meaningful context beyond the bare schema, though it doesn't specify format constraints or examples.

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 with 'Get build status' - a specific verb ('Get') and resource ('build status'). It distinguishes from siblings like 'list_jobs' (which lists jobs) and 'trigger_build' (which initiates builds). However, it doesn't explicitly mention what system or context these builds belong to (e.g., CI/CD pipeline).

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. There's no mention of when to use 'get_build_status' instead of 'list_jobs' (which might provide status overview) or 'trigger_build' (which creates new builds). No context about prerequisites, timing, or workflow integration is provided.

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/kjozsa/jenkins-mcp'

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