Skip to main content
Glama

getJob

Retrieve detailed information about Jenkins jobs including build status, configuration, and execution history for monitoring and automation workflows.

Instructions

Get information about a Jenkins job

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobFullNameYesFull path of the Jenkins job

Implementation Reference

  • The main handler function that executes the getJob tool logic: validates jobFullName, encodes the job path, fetches job information from the Jenkins API, and returns formatted success or failure response.
    export async function getJob(client, args) { const { jobFullName } = args; if (!jobFullName) return failure("getJob", "jobFullName is required"); const jobPath = encodeJobPath(jobFullName); try { const response = await client.get(`/job/${jobPath}/api/json`); if (response.status === 200) { return success("getJob", { job: response.data }); } return failure("getJob", `Job not found: ${jobFullName}`, { statusCode: response.status, }); } catch (error) { return formatError(error, "getJob"); } }
  • Input schema definition for the getJob tool, specifying jobFullName as required string parameter.
    inputSchema: { type: "object", properties: { jobFullName: { type: "string", description: "Full path of the Jenkins job", }, }, required: ["jobFullName"], },
  • Tool registration in toolRegistry, including name, description, inputSchema, and reference to the handler function imported from job-info.js.
    getJob: { name: "getJob", description: "Get information about a Jenkins job", inputSchema: { type: "object", properties: { jobFullName: { type: "string", description: "Full path of the Jenkins job", }, }, required: ["jobFullName"], }, handler: getJob, },

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

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