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
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | The workspace slug | |
| repo_slug | Yes | The repository slug |
Implementation Reference
- src/api/repositories.ts:24-30 (handler)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}`); }
- src/tools/index.ts:906-909 (handler)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); }
- src/tools/index.ts:23-26 (schema)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'), }),
- src/tools/index.ts:330-341 (registration)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'], }, },
- src/types/index.ts:266-269 (schema)TypeScript interface defining the parameters for the get_repository API call.export interface GetRepositoryParams { workspace: string; repo_slug: string; }