Skip to main content
Glama
Lexmata

Bitbucket Cloud MCP Server

by Lexmata

delete_repository

Remove a Bitbucket Cloud repository permanently. Specify workspace and repository slugs to delete repositories irreversibly.

Instructions

Delete a repository. This action is irreversible.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYesThe workspace slug
repo_slugYesThe repository slug

Implementation Reference

  • The switch case handler for the 'delete_repository' tool. It validates the input parameters using the Zod schema, calls RepositoriesAPI.delete to perform the deletion, and returns a success message.
    case 'delete_repository': {
      const params = toolSchemas.delete_repository.parse(args);
      await this.repos.delete(params);
      return { success: true, message: 'Repository deleted' };
    }
  • Zod input schema definition for the 'delete_repository' tool, specifying required workspace and repo_slug parameters.
    delete_repository: z.object({
      workspace: z.string().describe('The workspace slug'),
      repo_slug: z.string().describe('The repository slug'),
    }),
  • Tool registration in the toolDefinitions array for MCP, including name, description, and JSON schema for input validation.
    {
      name: 'delete_repository',
      description: 'Delete a repository. This action is irreversible.',
      inputSchema: {
        type: 'object' as const,
        properties: {
          workspace: { type: 'string', description: 'The workspace slug' },
          repo_slug: { type: 'string', description: 'The repository slug' },
        },
        required: ['workspace', 'repo_slug'],
      },
    },
  • The RepositoriesAPI.delete method, which makes the actual Bitbucket API DELETE request to remove the repository.
    async delete(params: GetRepositoryParams): Promise<void> {
      const { workspace, repo_slug } = params;
      await this.client.delete(`/repositories/${workspace}/${repo_slug}`);
    }
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively communicates the irreversible nature of the deletion, which is a critical behavioral trait. However, it does not mention potential side effects (e.g., impact on forks, permissions required, or error conditions), leaving some gaps.

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 extremely concise and front-loaded, consisting of just two sentences that directly convey the core action and its critical implication. Every word serves a purpose, with no wasted information or redundancy.

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

Completeness3/5

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

Given the tool's complexity (a destructive operation with 2 parameters) and the absence of both annotations and an output schema, the description is somewhat incomplete. It covers the irreversible nature but lacks details on permissions, confirmation steps, or what happens post-deletion (e.g., return values or error messages).

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?

The input schema has 100% description coverage, with clear documentation for 'workspace' and 'repo_slug' parameters. The description does not add any additional semantic meaning beyond what the schema provides, such as explaining how to obtain these slugs or their format, so it meets the baseline for high schema coverage.

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

Purpose5/5

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

The description clearly states the action ('Delete') and resource ('a repository'), making the purpose immediately obvious. It distinguishes this from sibling tools like 'create_repository', 'get_repository', and 'list_repositories' by specifying the destructive nature of the operation.

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

Usage Guidelines4/5

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

The description provides clear context that this is an irreversible action, which implicitly guides when to use it (for permanent deletion) versus alternatives like 'delete_branch' or other non-destructive tools. However, it does not explicitly name alternatives or specify prerequisites beyond the parameters.

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