Skip to main content
Glama
Kallows

MCP Bitbucket Python

by Kallows

bb_delete_issue

Remove an issue from a Bitbucket repository by specifying its ID and repository slug. Supports workspace customization for targeted issue management in Python-based Bitbucket integration.

Instructions

Delete an issue from a Bitbucket repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issue_idYesID of the issue to delete
repo_slugYesRepository slug/name
workspaceNoRepository workspace (defaults to kallows)kallows

Implementation Reference

  • Handler logic that deletes the specified issue in a Bitbucket repository by sending a DELETE request to the Bitbucket API issues endpoint. Handles success (204) and error cases.
    elif name == "bb_delete_issue":
        workspace = arguments.get("workspace", "kallows")
        repo_slug = arguments.get("repo_slug")
        issue_id = arguments.get("issue_id")
    
        url = f"https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}"
        response = requests.delete(url, auth=auth, headers=headers)
    
        if response.status_code == 204:
            return [types.TextContent(
                type="text",
                text=f"Issue {issue_id} deleted successfully"
            )]
        else:
            return [types.TextContent(
                type="text",
                text=f"Failed to delete issue: {response.status_code}\n{format_permission_error(response.text)}",
                isError=True
            )]
  • Tool registration including name, description, and input schema definition within the list_tools handler.
    types.Tool(
        name="bb_delete_issue",
        description="Delete an issue from a Bitbucket repository",
        inputSchema={
            "type": "object",
            "properties": {
                "workspace": {
                    "type": "string",
                    "description": "Repository workspace (defaults to kallows)",
                    "default": "kallows"
                },
                "repo_slug": {
                    "type": "string",
                    "description": "Repository slug/name"
                },
                "issue_id": {
                    "type": "string",
                    "description": "ID of the issue to delete"
                }
            },
            "required": ["repo_slug", "issue_id"]
        }
    ),
  • Input schema defining parameters for the bb_delete_issue tool: workspace (optional), repo_slug, and issue_id (required).
    types.Tool(
        name="bb_delete_issue",
        description="Delete an issue from a Bitbucket repository",
        inputSchema={
            "type": "object",
            "properties": {
                "workspace": {
                    "type": "string",
                    "description": "Repository workspace (defaults to kallows)",
                    "default": "kallows"
                },
                "repo_slug": {
                    "type": "string",
                    "description": "Repository slug/name"
                },
                "issue_id": {
                    "type": "string",
                    "description": "ID of the issue to delete"
                }
            },
            "required": ["repo_slug", "issue_id"]
        }
    ),
Install Server

Other Tools

Related 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/Kallows/mcp-bitbucket'

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