getStatus
Check Jenkins instance status and health information to monitor system availability and performance during automation workflows.
Instructions
Get Jenkins instance status and health information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/system-info.js:27-52 (handler)The main handler function for the getStatus tool. Fetches Jenkins overall load, queue, and computer/node information, computes status metrics like queue length, executor counts, and node details, then returns a success response.export async function getStatus(client) { try { const [overallLoad, queue, nodes] = await Promise.all([ client.get("/overallLoad/api/json"), client.get("/queue/api/json"), client.get("/computer/api/json"), ]); const status = { queueLength: queue.data?.items?.length || 0, totalExecutors: overallLoad.data?.totalExecutors || 0, busyExecutors: overallLoad.data?.busyExecutors || 0, availableExecutors: overallLoad.data?.availableExecutors || 0, nodes: nodes.data?.computer?.map((c) => ({ displayName: c.displayName, offline: c.offline, numExecutors: c.numExecutors, })) || [], }; return success("getStatus", { status }); } catch (error) { return formatError(error, "get status"); } }
- src/tools/index.js:205-213 (registration)Tool registration entry in the central tool registry, defining the tool's name, description, empty input schema, and reference to the handler function.getStatus: { name: "getStatus", description: "Get Jenkins instance status and health information", inputSchema: { type: "object", properties: {}, }, handler: getStatus, },
- src/tools/index.js:208-211 (schema)Input schema for the getStatus tool, specifying an empty object (no parameters required).inputSchema: { type: "object", properties: {}, },