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 and deployment progress.

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

  • MCP tool handler for list_pipelines: parses arguments using Zod schema and delegates to PipelinesAPI.list method.
    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 MCP toolDefinitions array, including name, description, and JSON schema.
      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: performs the Bitbucket API GET request to fetch paginated list of pipelines.
    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 parameters for listing 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