Get pipeline step log
get_pipeline_step_logFetch a Bitbucket pipeline step's log output to diagnose build failures. Provide a pipeline UUID or build number and optionally tail lines or byte limits to focus on the end where errors appear.
Instructions
Fetch the log output of a pipeline step. pipeline_uuid accepts either a pipeline UUID or a plain build number (e.g. 27419); UUIDs work with or without curly braces. Omit step_uuid to get the first failed step's log (or the last step when everything passed). Use tail_lines when you only need the end of the log — that is where failures are. Output is capped at max_bytes (default 100 KB), keeping the end of the log. If you only need whether a step passed, use list_pipelines instead — it returns step state without any log.
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": {
"pipeline_uuid": "<pipeline_uuid>"
},
"name": "get_pipeline_step_log"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | Bitbucket repo slug. | |
| max_bytes | No | Maximum log bytes to return, keeping the end. Default 100000. | |
| step_uuid | No | Step UUID. Defaults to the first failed step, else the last step. | |
| workspace | No | Bitbucket workspace (slug). | |
| tail_lines | No | Return only the last N lines of the log. | |
| pipeline_uuid | Yes | Pipeline UUID or build number. |