Skip to main content
Glama

archive_project

Archive a GitLab project by specifying its project ID. This action sets the project to archived status, preventing modifications while preserving all data.

Instructions

Archive a project.

Args:
    project_id: GitLab project ID
    token: GitLab Personal Access Token (optional)
    ctx: MCP context (automatically injected)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
tokenNo
ctxNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The archive_project tool handler. Decorated with @mcp.tool(), it takes a project_id and optional token, calls the GitLab API endpoint /projects/{project_id}/archive via POST, and returns a success or error message.
    @mcp.tool()
    async def archive_project(project_id: int, token: str = None, ctx=None) -> str:
        """Archive a project.
        
        Args:
            project_id: GitLab project ID
            token: GitLab Personal Access Token (optional)
            ctx: MCP context (automatically injected)
        """
        result = await make_gitlab_request(f"/projects/{project_id}/archive", "POST", ctx=ctx, token=token)
        
        if isinstance(result, dict) and "error" in result:
            return f"Error archiving project: {result['error']}"
        
        return f"Project {project_id} archived successfully"
  • The @mcp.tool() decorator on the archive_project function registers it as an MCP tool.
    @mcp.tool()
Behavior2/5

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

With no annotations, the description must explain behavioral traits. It only states 'Archive a project' without disclosing side effects, reversibility (though unarchive_project sibling hints), or authentication requirements. The token parameter is optional but not explained when it is needed.

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

Conciseness5/5

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

The description is extremely concise with one sentence and an Args list. No unnecessary words, well-structured for quick parsing.

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?

Given the presence of an output schema, return values are not needed. However, the description lacks context about the tool's effect, prerequisites, and how it differs from similar operations. For a tool with 3 parameters and a required one, more detail would improve completeness.

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

Parameters4/5

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

Schema description coverage is 0%, but the description explains each parameter: project_id is a GitLab project ID, token is an optional PAT, ctx is injected automatically. This adds meaning beyond the schema titles.

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 clearly states the action 'Archive a project' with a specific verb and resource. However, it does not differentiate from sibling tools like 'unarchive_project' or 'delete_project', and provides no additional context about what archiving entails.

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 is given on when to use this tool versus alternatives (e.g., delete_project, unarchive_project). There is no mention of prerequisites such as project existence or user permissions.

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