Skip to main content
Glama
Lexmata

Bitbucket Cloud MCP Server

by Lexmata

get_commit

Retrieve commit details including message, author, and parent commits from Bitbucket Cloud repositories to analyze code changes and track development history.

Instructions

Get details of a specific commit including its message, author, and parent commits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYesThe workspace slug
repo_slugYesThe repository slug
commit_hashYesThe commit hash

Implementation Reference

  • Core handler implementation: fetches the specific commit details from the Bitbucket API endpoint using the client.
    async get(workspace: string, repo_slug: string, commit_hash: string): Promise<BitbucketCommit> { return this.client.get<BitbucketCommit>( `/repositories/${workspace}/${repo_slug}/commit/${commit_hash}` ); }
  • MCP tool handler switch case: validates arguments with schema and delegates to CommitsAPI.get method.
    case 'get_commit': { const params = toolSchemas.get_commit.parse(args); return this.commits.get(params.workspace, params.repo_slug, params.commit_hash); }
  • Zod input schema definition for the get_commit tool parameters.
    get_commit: z.object({ workspace: z.string().describe('The workspace slug'), repo_slug: z.string().describe('The repository slug'), commit_hash: z.string().describe('The commit hash'), }),
  • Tool registration in the MCP toolDefinitions array, defining name, description, and JSON schema for inputs.
    { name: 'get_commit', description: 'Get details of a specific commit including its message, author, and parent commits.', inputSchema: { type: 'object' as const, 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'], },

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