Compare Builds
compare_buildsCompare good and bad Jenkins builds to see changes in results, duration, agents, stages, commits, and new errors; explain regressions or node-specific failures.
Instructions
What changed between a good and a bad build: result, duration, agent node, parameters, stage status/durations, commits in between (pipeline_changes = commits touching a Jenkinsfile or *.groovy), error groups that are new in the bad build, and env.log differences (if both builds archived env.log). Ideal for 'it worked yesterday', 'why is node A slower than node B' and for checking whether an error also occurs in green builds. good_on_node / bad_on_node pick builds by agent ('works on agent-01, fails on agent-03'; Pipeline jobs need up to 10 log reads); other_instance compares the same job across instances (no commit range).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"job": "<job>"
},
"name": "compare_builds"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bad | No | Build number or permalink: lastBuild, lastFailedBuild, lastSuccessfulBuild, lastCompletedBuild, lastUnsuccessfulBuild. Empty = build from the URL, else lastBuild. | lastFailedBuild |
| job | Yes | Job full name like 'cd/master/my-app' (folders separated by '/'), or a Jenkins job/build URL (instance is then detected from the URL). | |
| good | No | Build number or permalink: lastBuild, lastFailedBuild, lastSuccessfulBuild, lastCompletedBuild, lastUnsuccessfulBuild. Empty = build from the URL, else lastBuild. | lastSuccessfulBuild |
| instance | No | Jenkins instance name from list_instances. Empty = default instance. | |
| bad_on_node | No | Pick the newest failed/unstable build that ran on this node (overrides bad) | |
| good_on_node | No | Pick the newest successful build that ran on this node (overrides good) | |
| other_instance | No | Take the GOOD build of the same job from this instance (cross-instance comparison) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||