Skip to main content
Glama
lawp09

bitbucket-mcp

by lawp09

Get Pipeline Step Logs

get_pipeline_step_logs
Read-onlyIdempotent

Get Bitbucket pipeline step logs. By default returns the last 100 KiB; use byte-range parameters to fetch older sections of large logs.

Instructions

Get logs for a specific pipeline step.

Raw step logs are routinely multi-MB, so only the last max_bytes (100 KiB by default) are returned. Check the truncated flag in the response and page through the rest with start/end if you need more.

Reading the tail costs two requests: one to establish the log's size, one to fetch the tail. Passing an explicit start/end window skips the first.

Args: repo_slug: Repository slug pipeline_uuid: Pipeline UUID, e.g. "{adab6a1f-...}". Unlike get_pipeline_run, this endpoint is not documented to accept a build number — resolve the UUID first via get_pipeline_run if you only have a number. step_uuid: Step UUID (from get_pipeline_steps) workspace: Workspace name (optional, defaults to configured workspace) log_uuid: Optional log UUID. Omit for the main build container; pass a service container UUID to read that service's log instead. start: First byte to return (absolute, inclusive) end: Last byte to return (absolute, inclusive). start/end are an absolute byte window, not a "last N bytes" convention. max_bytes: Size of the trailing slice returned when no start/end is given (default: 100 KiB). Pass null for the whole log.

Returns: Dict with the log content, whether it was truncated, returned_bytes and total_bytes (null when the server did not disclose the full size)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
startNo
log_uuidNo
max_bytesNo
repo_slugYes
step_uuidYes
workspaceNo
pipeline_uuidYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.25.0
    • addedInput schema / properties / end
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "End"
      +}
    • addedInput schema / properties / log_uuid
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Log Uuid"
      +}
    • addedInput schema / properties / max_bytes
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": 102400,
      +  "title": "Max Bytes"
      +}
    • addedInput schema / properties / start
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Start"
      +}
    • addedOutput schema / properties / result / additionalProperties
      Added value: +true
    • changedOutput schema / properties / result / type
      Previous value: -"string"New value: +"object"
  2. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is clear. The description adds valuable behavioral context: logs are routinely multi-MB, only the last max_bytes are returned by default, the truncated flag must be checked, and paging with start/end is needed for full logs. It also discloses the two-request tail-read cost. No contradiction with 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 thorough yet efficiently structured. It opens with a one-line purpose, then a concise behavioral note about truncation and paging, followed by a clean Args list and Returns summary. Every sentence adds information; there is no fluff. The most important caveat (multi-MB logs and tail behavior) is front-loaded.

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?

Given 8 parameters, 0% schema coverage, and an output schema, the description is fully complete: it explains all parameters, behavioral caveats, return fields (content, truncated, returned_bytes, total_bytes), and usage patterns. It also references sibling tools for resolution steps. Nothing an agent needs to call it correctly 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 0%, so the description carries full burden for parameter meaning. It explains every parameter: repo_slug, pipeline_uuid (with example and note about build number), step_uuid, workspace (optional), log_uuid (main vs service container), start/end (absolute byte window, not last N), and max_bytes (default 100 KiB, null for whole log). This fully compensates for the absent schema descriptions.

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 states a specific verb and resource: 'Get logs for a specific pipeline step.' It clearly differentiates from siblings like get_pipeline_run by noting that this endpoint does not accept a build number and requires a resolved UUID, so an agent can select the right tool without 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 when-to-use and when-not-to-use guidance: it explains the two-request cost of tail reading and recommends passing an explicit start/end window to skip the first request. It also directs the agent to resolve a build number to a UUID via get_pipeline_run, and clarifies that log_uuid is for service containers vs the main container. This is model guidance with alternatives.

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

Deploy Server

Other Tools