@gohcltech/bitbucket-mcp
Version:
Bitbucket integration for Claude via Model Context Protocol
99 lines • 3.17 kB
TypeScript
/**
* @fileoverview Consolidated repository management tool for v2.1.
*
* Replaces v2.0 tools: list_repositories, get_repository, create_repository, update_repository, delete_repository
* Consolidates 5 tools into 1 with action-based routing.
*/
import { Tool } from '@modelcontextprotocol/sdk/types.js';
import { ConsolidatedBaseTool } from './consolidated-base-tool.js';
import { ToolHandler } from './base-tool.js';
import { ToolCategory } from '../auth-capabilities.js';
import { RepositoryAction } from '../types/consolidated-tools.js';
/**
* Consolidated repository management tool for v2.1.
*
* Provides unified repository management operations with action-based routing.
*
* **Replaces v2.0 tools:**
* - list_repositories
* - get_repository
* - create_repository
* - update_repository
* - delete_repository
*
* **Actions:**
* - `list`: List repositories in a workspace
* - `get`: Get detailed repository information
* - `create`: Create a new repository
* - `update`: Update repository settings and metadata
* - `delete`: Delete a repository
*
* @example
* ```typescript
* // List repositories in workspace
* const response = await tool.execute({
* action: 'list',
* workspaceSlug: 'my-workspace'
* });
*
* // Create a new repository
* const response = await tool.execute({
* action: 'create',
* workspaceSlug: 'my-workspace',
* name: 'my-repo',
* description: 'Repository description',
* isPrivate: true
* });
*
* // Update repository
* const response = await tool.execute({
* action: 'update',
* workspaceSlug: 'my-workspace',
* repoSlug: 'my-repo',
* description: 'Updated description',
* hasIssues: true
* });
* ```
*/
export declare class ManageRepositoriesTool extends ConsolidatedBaseTool<RepositoryAction> {
getTools(): Tool[];
getToolCategory(): ToolCategory;
protected getActionHandler(action: RepositoryAction): ToolHandler | null;
protected validateActionParams(action: RepositoryAction, args: Record<string, any>): void;
/**
* Handler for listing repositories in a workspace.
*
* @param args - Tool arguments (workspace)
* @returns List of repositories with metadata
*/
private handleListRepositories;
/**
* Handler for getting detailed information about a repository.
*
* @param args - Tool arguments (must include repoSlug)
* @returns Detailed repository information
*/
private handleGetRepository;
/**
* Handler for creating a new repository.
*
* @param args - Tool arguments (must include name)
* @returns Created repository information
*/
private handleCreateRepository;
/**
* Handler for updating repository settings.
*
* @param args - Tool arguments (must include repoSlug, optional update fields)
* @returns Updated repository information
*/
private handleUpdateRepository;
/**
* Handler for deleting a repository.
*
* @param args - Tool arguments (must include repoSlug)
* @returns Confirmation of deletion
*/
private handleDeleteRepository;
}
//# sourceMappingURL=repository-tools.d.ts.map