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 code projects.

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 main handler logic for the 'get_repository' MCP tool. It validates input parameters using the Zod schema and delegates to the RepositoriesAPI.get method to fetch the repository details from Bitbucket.
    case 'get_repository': { const params = toolSchemas.get_repository.parse(args); return this.repos.get(params); }
  • Zod schema for validating input parameters of the get_repository tool (workspace and repo_slug). Used in the handler for parsing args.
    get_repository: z.object({ workspace: z.string().describe('The workspace slug'), repo_slug: z.string().describe('The repository slug'), }),
  • Registration of the 'get_repository' tool in the MCP toolDefinitions array, including name, description, and JSON schema for inputs.
    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'], }, },
  • Supporting method in RepositoriesAPI that executes the Bitbucket API GET request to retrieve details of the specified repository.
    async get(params: GetRepositoryParams): Promise<BitbucketRepository> { const { workspace, repo_slug } = params; return this.client.get<BitbucketRepository>(`/repositories/${workspace}/${repo_slug}`); }

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