get_commit
Retrieve detailed information about a specific commit in a Bitbucket repository using workspace, repository, and commit hash identifiers.
Instructions
Get details of a specific commit
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | The workspace slug | |
| repo_slug | Yes | The repository slug | |
| commit_hash | Yes | The commit hash |
Implementation Reference
- src/BitbucketClient.ts:188-191 (handler)The actual implementation of the getCommit method that calls the Bitbucket API.
async getCommit(workspace: string, repoSlug: string, commitHash: string): Promise<Commit> { const response = await this.api.get(`/repositories/${workspace}/${repoSlug}/commit/${commitHash}`); return response.data; } - src/index.ts:295-316 (registration)The tool definition for 'get_commit' registered in the MCP tool list.
{ name: 'get_commit', description: 'Get details of a specific commit', inputSchema: { type: 'object', properties: { workspace: { type: 'string', description: 'The workspace slug', }, repo_slug: { type: 'string', description: 'The repository slug', }, commit_hash: { type: 'string', description: 'The commit hash', }, }, required: ['workspace', 'repo_slug', 'commit_hash'], }, }, - src/index.ts:598-613 (handler)The handler case in the MCP request processor that calls the BitbucketClient's getCommit method.
case 'get_commit': { const { workspace, repo_slug, commit_hash } = args as { workspace: string; repo_slug: string; commit_hash: string; }; const commit = await client.getCommit(workspace, repo_slug, commit_hash); return { content: [ { type: 'text', text: JSON.stringify(commit, null, 2), }, ], }; }