delete_webhook
Remove a webhook from a Bitbucket repository using its UUID to stop automated notifications and integrations.
Instructions
Delete a webhook.
Args:
repo_slug: Repository slug
webhook_uuid: Webhook UUID (from list_webhooks)
Returns:
Confirmation of deletion
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_slug | Yes | ||
| webhook_uuid | Yes |
Implementation Reference
- src/server.py:1255-1270 (handler)The main MCP tool handler function for 'delete_webhook'. It validates input, calls the BitbucketClient helper method, and returns a success response.@mcp.tool() @handle_bitbucket_error @formatted def delete_webhook(repo_slug: str, webhook_uuid: str) -> dict: """Delete a webhook. Args: repo_slug: Repository slug webhook_uuid: Webhook UUID (from list_webhooks) Returns: Confirmation of deletion """ client = get_client() client.delete_webhook(repo_slug, webhook_uuid) return {}
- src/bitbucket_client.py:1231-1245 (helper)The BitbucketClient class method that performs the actual HTTP DELETE request to the Bitbucket API to remove the webhook.def delete_webhook( self, repo_slug: str, webhook_uid: str ) -> bool: """Delete a webhook. Args: repo_slug: Repository slug webhook_uid: Webhook UID Returns: True if deleted successfully """ webhook_uid = ensure_uuid_braces(webhook_uid) self._request("DELETE", self._repo_path(repo_slug, "hooks", webhook_uid)) return True
- src/server.py:1255-1255 (registration)The @mcp.tool() decorator registers this function as an MCP tool named 'delete_webhook'.@mcp.tool()