Skip to main content
Glama

Get pipeline step log

get_pipeline_step_log
Read-onlyIdempotent

Fetch 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNoBitbucket repo slug.
max_bytesNoMaximum log bytes to return, keeping the end. Default 100000.
step_uuidNoStep UUID. Defaults to the first failed step, else the last step.
workspaceNoBitbucket workspace (slug).
tail_linesNoReturn only the last N lines of the log.
pipeline_uuidYesPipeline UUID or build number.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.6
    • addedInput schema / properties / max_bytes
      Added value: +{
      +  "description": "Maximum log bytes to return, keeping the end. Default 100000.",
      +  "maximum": 5000000,
      +  "minimum": 1000,
      +  "type": "integer"
      +}
    • changedInput schema / properties / pipeline_uuid / description
      Previous value: -"Pipeline UUID."New value: +"Pipeline UUID or build number."
    • changedInput schema / properties / step_uuid / description
      Previous value: -"Pipeline step UUID."New value: +"Step UUID. Defaults to the first failed step, else the last step."
    • addedInput schema / properties / tail_lines
      Added value: +{
      +  "description": "Return only the last N lines of the log.",
      +  "maximum": 100000,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "pipeline_uuid",
      -  "step_uuid"
      -]New value: +[
      +  "pipeline_uuid"
      +]
  2. First observedv0.1.5

TDQS

A5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint: false. The description adds valuable behavioral context beyond these: output is capped at max_bytes (default 100 KB) keeping the end, tail_lines returns last N lines, and the default behavior for step_uuid. This enriches the agent's understanding without contradicting annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded. It leads with the core purpose, then explains parameter behaviors, and ends with an alternative tool. Every sentence provides distinct value, with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 6 parameters, 1 required, and no output schema, the description covers all critical aspects: defaults, limits, acceptance criteria for pipeline_uuid, and alternative tools. Nothing an agent needs to correctly call this tool is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. However, the description adds substantial meaning: pipeline_uuid accepts build numbers and curly braces, step_uuid has a default based on failure state, tail_lines and max_bytes have specific behaviors. This goes beyond the schema descriptions, making the tool far more usable.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool fetches log output of a pipeline step, with a specific verb+resource. It distinguishes itself from siblings by explicitly naming list_pipelines as an alternative for step state, avoiding ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance: when to use tail_lines, when to omit step_uuid (to get first failed step), and when to prefer list_pipelines instead. It names the alternative and the condition for selecting it, leaving no inference required.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.