Get Stage Log
get_stage_logRetrieve errors and the last meaningful lines from one Jenkins pipeline stage (default: the failed stage) to diagnose failures without reading the full log.
Instructions
Errors and the last meaningful lines of ONE pipeline stage (default: the failed stage). Much cheaper than the full log. Lines of parallel branches can interleave in the console; exact=True reads the stage step by step from wfapi instead (falls back to the console without the plugin).
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": "get_stage_log"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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). | |
| build | No | Build number or permalink: lastBuild, lastFailedBuild, lastSuccessfulBuild, lastCompletedBuild, lastUnsuccessfulBuild. Empty = build from the URL, else lastBuild. | |
| exact | No | Per-step log from the Stage View API (wfapi): exact for parallel branches; more requests | |
| stage | No | Stage name; empty = the failed stage | |
| instance | No | Jenkins instance name from list_instances. Empty = default instance. | |
| max_lines | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |