Skip to main content
Glama
Lexmata

Bitbucket Cloud MCP Server

by Lexmata

get_repository

Retrieve repository details including branches, pull requests, and metadata from Bitbucket Cloud to manage and analyze project information.

Instructions

Get details of a specific repository including its branches, pull requests, and other metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYesThe workspace slug
repo_slugYesThe repository slug

Implementation Reference

  • The core handler function that fetches the specific repository details from the Bitbucket API using the authenticated client.
    /** * Get a specific repository */ async get(params: GetRepositoryParams): Promise<BitbucketRepository> { const { workspace, repo_slug } = params; return this.client.get<BitbucketRepository>(`/repositories/${workspace}/${repo_slug}`); }
  • The tool handler dispatch case in ToolHandler.handleTool that parses input parameters and delegates to RepositoriesAPI.get.
    case 'get_repository': { const params = toolSchemas.get_repository.parse(args); return this.repos.get(params); }
  • Zod schema definition for validating get_repository tool input parameters.
    get_repository: z.object({ workspace: z.string().describe('The workspace slug'), repo_slug: z.string().describe('The repository slug'), }),
  • Tool registration in the toolDefinitions array, including name, description, and input schema for MCP.
    name: 'get_repository', description: 'Get details of a specific repository including its branches, pull requests, and other metadata.', inputSchema: { type: 'object' as const, properties: { workspace: { type: 'string', description: 'The workspace slug' }, repo_slug: { type: 'string', description: 'The repository slug' }, }, required: ['workspace', 'repo_slug'], }, },
  • TypeScript interface defining the parameters for the get_repository API call.
    export interface GetRepositoryParams { workspace: string; repo_slug: string; }

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