Skip to main content
Glama
jlromano

Bitbucket MCP Server

by jlromano

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
NameRequiredDescriptionDefault
workspaceYesThe workspace slug
repo_slugYesThe repository slug
commit_hashYesThe commit hash

Implementation Reference

  • 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'],
      },
    },
  • 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),
          },
        ],
      };
    }

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/jlromano/bitbucket-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server