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
| Name | Required | Description | Default |
|---|---|---|---|
| issue_id | Yes | ID of the issue to delete | |
| repo_slug | Yes | Repository slug/name | |
| workspace | No | Repository workspace (defaults to kallows) | kallows |
Input Schema (JSON Schema)
{
"properties": {
"issue_id": {
"description": "ID of the issue to delete",
"type": "string"
},
"repo_slug": {
"description": "Repository slug/name",
"type": "string"
},
"workspace": {
"default": "kallows",
"description": "Repository workspace (defaults to kallows)",
"type": "string"
}
},
"required": [
"repo_slug",
"issue_id"
],
"type": "object"
}
Implementation Reference
- src/mcp_bitbucket/server.py:736-754 (handler)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 )]
- src/mcp_bitbucket/server.py:271-293 (registration)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"] } ),
- src/mcp_bitbucket/server.py:271-293 (schema)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"] } ),