Skip to main content
Glama

gitlab_get_project

Retrieve complete project metadata and configuration details from GitLab using a project ID or path. Returns settings, statistics, and full project information for analysis or verification.

Instructions

Get detailed project information Returns: Complete project metadata, settings, statistics Use when: Need full project details, checking configuration Required: Project ID or path

Example response: { "id": 12345, "name": "my-project", "path_with_namespace": "group/my-project", "default_branch": "main", "visibility": "private", "issues_enabled": true, "merge_requests_enabled": true, "wiki_enabled": true, "statistics": { "commit_count": 1024, "repository_size": 15728640 } }

Related tools:

  • gitlab_list_projects: Find projects

  • gitlab_get_current_project: Auto-detect from git

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesProject identifier (required) Type: integer OR string Format: numeric ID or 'namespace/project' Required: Yes Examples: - 12345 (numeric ID from project settings) - 'gitlab-org/gitlab' (full path from URL) - 'my-company/backend/api-service' (nested groups) How to find: Check project URL or Settings > General > Project ID

Implementation Reference

  • The core handler function for the 'gitlab_get_project' tool. It extracts the required 'project_id' from arguments and calls the GitLabClient's get_project method to fetch project details.
    def handle_get_project(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> Dict[str, Any]: """Handle getting single project""" project_id = require_argument(arguments, "project_id") return client.get_project(project_id)
  • Registration of the handler function in the TOOL_HANDLERS dictionary, mapping 'gitlab_get_project' to handle_get_project.
    TOOL_GET_PROJECT: handle_get_project, TOOL_GET_CURRENT_PROJECT: handle_get_current_project,
  • Tool schema definition in server.py's list_tools handler, specifying input schema requiring 'project_id' as string.
    name=TOOL_GET_PROJECT, description=desc.DESC_GET_PROJECT, inputSchema={ "type": "object", "properties": { "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID_REQUIRED} }, "required": ["project_id"] }
  • Constant definition for the tool name 'gitlab_get_project', used across the codebase for consistency.
    TOOL_GET_PROJECT = "gitlab_get_project"
  • Helper function used by the handler to validate and extract the required 'project_id' argument.
    def require_argument(arguments: Optional[Dict[str, Any]], key: str, error_msg: Optional[str] = None) -> Any: """Get required argument or raise ValueError""" if not arguments or key not in arguments: raise ValueError(error_msg or f"{key} is required") return arguments[key]

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/Vijay-Duke/mcp-gitlab'

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