Skip to main content
Glama
Lexmata

Bitbucket Cloud MCP Server

by Lexmata

list_pipelines

Retrieve pipeline execution history for a Bitbucket Cloud repository to monitor build status, track deployments, and analyze CI/CD workflow performance.

Instructions

List pipeline runs for a repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYesThe workspace slug
repo_slugYesThe repository slug
pageNoPage number
pagelenNoResults per page

Implementation Reference

  • The main tool handler in ToolHandler.handleTool that parses arguments using the schema and calls PipelinesAPI.list to execute the tool logic.
    case 'list_pipelines': { const params = toolSchemas.list_pipelines.parse(args); return this.pipelines.list(params); }
  • Zod input schema definition for the list_pipelines tool.
    list_pipelines: z.object({ workspace: z.string().describe('The workspace slug'), repo_slug: z.string().describe('The repository slug'), page: z.number().optional().describe('Page number'), pagelen: z.number().optional().describe('Results per page'), }),
  • Tool registration in the toolDefinitions array, including name, description, and inputSchema for MCP protocol.
    { name: 'list_pipelines', description: 'List pipeline runs for a repository.', inputSchema: { type: 'object' as const, properties: { workspace: { type: 'string', description: 'The workspace slug' }, repo_slug: { type: 'string', description: 'The repository slug' }, page: { type: 'number', description: 'Page number' }, pagelen: { type: 'number', description: 'Results per page' }, }, required: ['workspace', 'repo_slug'], }, },
  • PipelinesAPI.list method that performs the actual HTTP GET request to Bitbucket API to list pipelines.
    /** * List pipelines for a repository */ async list(params: ListPipelinesParams): Promise<PaginatedResponse<BitbucketPipeline>> { const { workspace, repo_slug, ...queryParams } = params; return this.client.get<PaginatedResponse<BitbucketPipeline>>( `/repositories/${workspace}/${repo_slug}/pipelines`, queryParams as Record<string, string | number | undefined> ); }
  • TypeScript interface defining the parameters for list_pipelines.
    export interface ListPipelinesParams { workspace: string; repo_slug: string; page?: number; pagelen?: number; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Lexmata/bitbucket-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server