Skip to main content
Glama
Lexmata

Bitbucket Cloud MCP Server

by Lexmata

list_repository_forks

Retrieve all forks of a Bitbucket repository to track derivative projects and monitor code distribution across workspaces.

Instructions

List all forks of a repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYesThe workspace slug
repo_slugYesThe repository slug
pageNoPage number
pagelenNoResults per page

Implementation Reference

  • Core implementation: fetches forks of a repository via Bitbucket API endpoint `/repositories/{workspace}/{repo_slug}/forks` with pagination support.
    async listForks(
      params: GetRepositoryParams & { page?: number; pagelen?: number }
    ): Promise<PaginatedResponse<BitbucketRepository>> {
      const { workspace, repo_slug, ...queryParams } = params;
      return this.client.get<PaginatedResponse<BitbucketRepository>>(
        `/repositories/${workspace}/${repo_slug}/forks`,
        queryParams as Record<string, string | number | undefined>
      );
    }
  • ToolHandler switch case: parses tool arguments using schema and delegates to RepositoriesAPI.listForks
    case 'list_repository_forks': {
      const params = toolSchemas.list_repository_forks.parse(args);
      return this.repos.listForks(params);
    }
  • Zod input schema for validating tool parameters: workspace, repo_slug, optional page and pagelen.
    list_repository_forks: z.object({
      workspace: z.string().describe('The workspace slug'),
      repo_slug: z.string().describe('The repository slug'),
      page: z.number().optional().describe('Page number'),
      pagelen: z.number().optional().describe('Results per page'),
    }),
  • Tool registration in toolDefinitions array, including name, description, and JSON schema for MCP.
    {
      name: 'list_repository_forks',
      description: 'List all forks of a repository.',
      inputSchema: {
        type: 'object' as const,
        properties: {
          workspace: { type: 'string', description: 'The workspace slug' },
          repo_slug: { type: 'string', description: 'The repository slug' },
          page: { type: 'number', description: 'Page number' },
          pagelen: { type: 'number', description: 'Results per page' },
        },
        required: ['workspace', 'repo_slug'],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states it's a list operation (implying read-only), but doesn't mention pagination behavior (implied by parameters), rate limits, authentication requirements, or what the output looks like. This is inadequate for a tool with 4 parameters and no output schema.

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, clear sentence with zero wasted words. It's front-loaded with the core purpose and appropriately sized for a straightforward list operation.

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, no output schema, and 4 parameters, the description is insufficient. It doesn't explain the pagination behavior (critical for list operations), authentication needs, or return format. For a tool in this context, more behavioral context is needed.

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 fully documents all 4 parameters. The description adds no additional parameter context beyond implying the tool operates on a repository. This meets the baseline for high schema coverage but doesn't enhance understanding.

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 verb ('List') and resource ('forks of a repository'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'list_repositories' or 'list_pull_requests' beyond the specific resource type, which is why it doesn't reach a perfect score.

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 prerequisites (e.g., needing repository access) or compare it to similar list operations in the sibling set, leaving the agent to infer usage context.

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