Skip to main content
Glama

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)

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