getStatus
Check Jenkins instance status and health information to monitor system availability and performance.
Instructions
Get Jenkins instance status and health information
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "getStatus"
}
}Input 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. It fetches overall load, queue, and nodes information from Jenkins APIs and returns formatted status data.
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 in the central registry, defining 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 getStatus tool, which requires no parameters.
inputSchema: { type: "object", properties: {}, },