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
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | The workspace slug | |
| repo_slug | Yes | The repository slug | |
| page | No | Page number | |
| pagelen | No | Results per page |
Implementation Reference
- src/api/repositories.ts:51-59 (handler)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> ); }
- src/tools/index.ts:921-924 (handler)ToolHandler switch case: parses tool arguments using schema and delegates to RepositoriesAPI.listForkscase 'list_repository_forks': { const params = toolSchemas.list_repository_forks.parse(args); return this.repos.listForks(params); }
- src/tools/index.ts:45-50 (schema)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'), }),
- src/tools/index.ts:373-386 (registration)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'], }, },