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]
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses that the tool returns 'Complete project metadata, settings, statistics' and provides an example response, which adds valuable behavioral context. However, it doesn't mention potential limitations like authentication requirements, rate limits, or error conditions.

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

Conciseness4/5

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

The description is well-structured with clear sections (purpose, returns, usage, required, example, related tools) and front-loaded key information. It's appropriately sized, though the example response is detailed but necessary for clarity. Every sentence earns its place.

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

Completeness4/5

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

Given the tool's low complexity (1 parameter, no nested objects) and 100% schema coverage, the description is mostly complete. It provides purpose, usage guidelines, example output, and sibling differentiation. However, with no output schema and no annotations, it could benefit from more behavioral details like error handling or authentication needs.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents the 'project_id' parameter thoroughly with examples and format details. The description adds minimal value beyond stating 'Required: Project ID or path', which is already covered in the schema. Baseline 3 is appropriate when schema does the heavy lifting.

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

Purpose5/5

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

The description clearly states the verb 'Get' and resource 'detailed project information', making the purpose specific. It distinguishes from siblings like 'gitlab_list_projects' (find projects) and 'gitlab_get_current_project' (auto-detect), establishing clear differentiation.

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

Usage Guidelines5/5

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

The description explicitly provides usage guidance with 'Use when: Need full project details, checking configuration' and lists related tools with their purposes. It clearly indicates when to use this tool versus alternatives like 'gitlab_list_projects' for finding projects.

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

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