Skip to main content
Glama
Lexmata

Bitbucket Cloud MCP Server

by Lexmata

get_commit

Retrieve commit details like message, author, and parent commits from a Bitbucket Cloud repository to analyze 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

  • The handler for the 'get_commit' tool. Parses input parameters using the Zod schema and calls the CommitsAPI.get method to fetch commit details from Bitbucket.
    case 'get_commit': {
      const params = toolSchemas.get_commit.parse(args);
      return this.commits.get(params.workspace, params.repo_slug, params.commit_hash);
    }
  • Zod schema definition for validating input parameters of the get_commit tool: workspace, repo_slug, and commit_hash.
    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'),
    }),
  • MCP tool registration for 'get_commit', including name, description, and input schema for the Model Context Protocol.
    {
      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'],
      },
  • Core implementation of fetching a specific commit via Bitbucket API GET request to /repositories/{workspace}/{repo_slug}/commit/{commit_hash}.
    async get(workspace: string, repo_slug: string, commit_hash: string): Promise<BitbucketCommit> {
      return this.client.get<BitbucketCommit>(
        `/repositories/${workspace}/${repo_slug}/commit/${commit_hash}`
      );
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states it 'gets details' but doesn't disclose behavioral traits like whether it's read-only, requires authentication, has rate limits, or what happens with invalid inputs. For a read operation with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the purpose and key details. Every word earns its place with no redundancy or fluff, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete. It mentions what details are returned but doesn't cover the return format, error handling, or behavioral context. For a tool with three parameters and no structured output documentation, more completeness is needed to guide an agent effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters (workspace, repo_slug, commit_hash) with descriptions. The description adds no additional parameter semantics beyond implying 'commit_hash' is needed to identify the commit, which is already clear from the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get details of a specific commit including its message, author, and parent commits.' It specifies the verb ('Get'), resource ('commit'), and key details returned. However, it doesn't explicitly differentiate from sibling tools like 'list_commits' or 'get_commit_diff', which would require a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'list_commits' for multiple commits or 'get_commit_diff' for changes, nor does it specify prerequisites or exclusions. Usage is implied by the name and description alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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