Skip to main content
Glama

delete_tag

Remove a GitLab tag from a project using its ID and tag name.

Instructions

Delete a tag.

Args:
    project_id: GitLab project ID
    tag_name: Tag name to delete
    token: GitLab Personal Access Token (optional)
    ctx: MCP context (automatically injected)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
tag_nameYes
tokenNo
ctxNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function for the 'delete_tag' MCP tool. It sends a DELETE request to the GitLab API endpoint /projects/{project_id}/repository/tags/{tag_name} to delete a repository tag.
    @mcp.tool()
    async def delete_tag(project_id: int, tag_name: str, token: str = None, ctx=None) -> str:
        """Delete a tag.
        
        Args:
            project_id: GitLab project ID
            tag_name: Tag name to delete
            token: GitLab Personal Access Token (optional)
            ctx: MCP context (automatically injected)
        """
        import urllib.parse
        encoded_tag = urllib.parse.quote(tag_name, safe='')
        result = await make_gitlab_request(f"/projects/{project_id}/repository/tags/{encoded_tag}", "DELETE", ctx=ctx, token=token)
        
        if isinstance(result, dict) and "error" in result:
            return f"Error deleting tag: {result['error']}"
        
        return f"Tag '{tag_name}' deleted successfully"
  • Registration of 'delete_tag' as an MCP tool via the @mcp.tool() decorator on the async function.
    @mcp.tool()
Behavior2/5

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

No annotations provided, so the description must fully disclose behavioral traits. It only states deletion without mentioning destructive nature, permissions, reversibility, or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Very concise but essentially reduces to function signature. Could be more informative without being verbose.

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

Completeness2/5

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

With 4 parameters, no schema descriptions, no annotations, and an output schema not described, the description is too minimal to be fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so description should compensate. It lists parameters but adds no meaning beyond their names (e.g., no format, constraints, or examples).

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

Purpose4/5

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

The description explicitly states 'Delete a tag' with clear verb and resource. However, it does not differentiate from sibling tools like delete_branch or delete_project.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives, no prerequisites or context provided.

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/skmprb/gitlab-clone-mcp-server'

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