Skip to main content
Glama

delete_tag

Remove tags from Bitbucket repositories to clean up version history and manage releases. Specify repository slug and tag name to delete unwanted tags.

Instructions

Delete a tag from a repository.

Args:
    repo_slug: Repository slug
    tag_name: Tag name to delete

Returns:
    Confirmation of deletion

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_slugYes
tag_nameYes

Implementation Reference

  • MCP tool handler for 'delete_tag' that invokes the Bitbucket client to delete the specified tag.
    @mcp.tool()
    @handle_bitbucket_error
    @formatted
    def delete_tag(repo_slug: str, tag_name: str) -> dict:
        """Delete a tag from a repository.
    
        Args:
            repo_slug: Repository slug
            tag_name: Tag name to delete
    
        Returns:
            Confirmation of deletion
        """
        client = get_client()
        client.delete_tag(repo_slug, tag_name)
        return {}
  • BitbucketClient helper method that sends the DELETE request to Bitbucket API to remove the tag reference.
    def delete_tag(
        self, repo_slug: str, tag_name: str
    ) -> bool:
        """Delete a tag.
    
        Args:
            repo_slug: Repository slug
            tag_name: Tag name to delete
    
        Returns:
            True if deleted successfully
        """
        self._request(
            "DELETE",
            self._repo_path(repo_slug, "refs", "tags", tag_name),
        )
        return True

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/JaviMaligno/mcp-server-bitbucket'

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