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
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | The workspace slug | |
| repo_slug | Yes | The repository slug |
Implementation Reference
- src/tools/index.ts:908-911 (handler)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); }
- src/tools/index.ts:23-26 (schema)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'), }),
- src/tools/index.ts:330-341 (registration)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'], }, },
- src/api/repositories.ts:27-30 (helper)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}`); }