Skip to main content
Glama
jlromano

Bitbucket MCP Server

by jlromano

list_commits

Retrieve commit history from a Bitbucket repository to track changes, review code updates, and analyze development progress.

Instructions

List commits in a repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYesThe workspace slug
repo_slugYesThe repository slug
branchNoFilter commits by branch (optional)

Implementation Reference

  • Implementation of listCommits in the Bitbucket client class.
    async listCommits(workspace: string, repoSlug: string, branch?: string): Promise<Commit[]> {
      const params = branch ? { branch } : {};
      const response = await this.api.get(`/repositories/${workspace}/${repoSlug}/commits`, { params });
      return response.data.values;
    }
  • src/index.ts:273-294 (registration)
    Registration of the list_commits tool definition.
    {
      name: 'list_commits',
      description: 'List commits in a repository',
      inputSchema: {
        type: 'object',
        properties: {
          workspace: {
            type: 'string',
            description: 'The workspace slug',
          },
          repo_slug: {
            type: 'string',
            description: 'The repository slug',
          },
          branch: {
            type: 'string',
            description: 'Filter commits by branch (optional)',
          },
        },
        required: ['workspace', 'repo_slug'],
      },
    },
  • Handler case in the server to invoke listCommits.
    case 'list_commits': {
      const { workspace, repo_slug, branch } = args as {
        workspace: string;
        repo_slug: string;
        branch?: string;
      };
      const commits = await client.listCommits(workspace, repo_slug, branch);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(commits, null, 2),
          },
        ],
      };
    }
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 of behavioral disclosure. It states the action ('List commits') but fails to describe traits like pagination, rate limits, authentication needs, error conditions, or what the output looks like (e.g., list format, fields). This is a significant gap for a tool with no annotation coverage.

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 with zero waste—it directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy to parse quickly.

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 the complexity (a list operation with filtering), lack of annotations, and no output schema, the description is incomplete. It does not address behavioral aspects like output format, pagination, or error handling, which are crucial for an agent to use the tool effectively. The description should provide more context to compensate for missing structured data.

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 parameters (workspace, repo_slug, branch). The description does not add any meaning beyond what the schema provides, such as explaining how 'branch' filtering works or providing examples. 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 'List commits in a repository' clearly states the verb ('List') and resource ('commits in a repository'), making the purpose immediately understandable. It does not distinguish from siblings like 'get_commit' (singular) or 'compare_branches', but it's specific enough to avoid vagueness or tautology.

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 lacks any mention of prerequisites, context (e.g., after creating a pull request), or exclusions, leaving the agent to infer usage from the tool name and parameters 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/jlromano/bitbucket-mcp'

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