unarchive_project
Restore an archived GitLab project to active state, enabling full access and modifications.
Instructions
Unarchive a project.
Args:
project_id: GitLab project ID
token: GitLab Personal Access Token (optional)
ctx: MCP context (automatically injected)Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | ||
| token | No | ||
| ctx | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- The 'unarchive_project' tool handler function. It calls GitLab API POST /projects/{project_id}/unarchive to unarchive a previously archived project.
@mcp.tool() async def unarchive_project(project_id: int, token: str = None, ctx=None) -> str: """Unarchive 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}/unarchive", "POST", ctx=ctx, token=token) if isinstance(result, dict) and "error" in result: return f"Error unarchiving project: {result['error']}" return f"Project {project_id} unarchived successfully" - gitlab_clone_mcp_server/server.py:722-736 (registration)The tool is registered via the @mcp.tool() decorator on line 722, which registers 'unarchive_project' as an MCP tool in the FastMCP server instance.
@mcp.tool() async def unarchive_project(project_id: int, token: str = None, ctx=None) -> str: """Unarchive 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}/unarchive", "POST", ctx=ctx, token=token) if isinstance(result, dict) and "error" in result: return f"Error unarchiving project: {result['error']}" return f"Project {project_id} unarchived successfully"