Skip to main content
Glama

gitlab_list_projects

Browse and filter accessible GitLab projects by ownership or search terms, returning summaries with IDs, names, and URLs for easy project discovery.

Instructions

List accessible GitLab projects Returns: Array of project summaries with ID, name, description, URL Use when: Browsing projects, finding project IDs Pagination: Yes (default 20 per page) Filtering: By ownership, name search

Example response: [{ "id": 12345, "name": "my-project", "path_with_namespace": "group/my-project", "description": "Project description", "web_url": "https://gitlab.com/group/my-project" }]

Related tools:

  • gitlab_get_project: Get full project details

  • gitlab_search_projects: Search all GitLab projects

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownedNoFilter for owned projects only Type: boolean Default: false Options: - true: Only projects where you are the owner - false: All accessible projects Use case: Quickly find your personal projects
searchNoSearch query Type: string Matching: Case-insensitive, partial matching Searches in: Project names and descriptions Examples: - 'frontend' (finds 'frontend-app', 'old-frontend', etc.) - 'API' (matches 'api', 'API', 'GraphQL-API', etc.) Tip: Use specific terms for better results for projects
per_pageNoNumber of results per page Type: integer Range: 1-100 Default: 20 Example: 50 (for faster browsing) Tip: Use smaller values (10-20) for detailed operations, larger (50-100) for listing
pageNoPage number for pagination Type: integer Range: ≥1 Default: 1 Example: 3 (to get the third page of results) Note: Use with per_page to navigate large result sets

Implementation Reference

  • Core implementation of the gitlab_list_projects tool. Extracts pagination and filter parameters from arguments and calls GitLabClient.get_projects() to fetch the list of projects.
    def handle_list_projects(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> Dict[str, Any]:
        """Handle listing projects"""
        owned = get_argument(arguments, "owned", False)
        search = get_argument(arguments, "search")
        per_page = get_argument(arguments, "per_page", DEFAULT_PAGE_SIZE)
        page = get_argument(arguments, "page", 1)
        
        return client.get_projects(owned=owned, search=search, per_page=per_page, page=page)
  • MCP Tool schema definition exposed via list_tools(), including input validation schema, properties for owned/search/pagination, and description reference.
    types.Tool(
        name=TOOL_LIST_PROJECTS,
        description=desc.DESC_LIST_PROJECTS,
        inputSchema={
            "type": "object",
            "properties": {
                "owned": {"type": "boolean", "description": desc.DESC_OWNED_PROJECTS, "default": False},
                "search": {"type": "string", "description": desc.DESC_SEARCH_TERM + " for projects"},
                "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
            }
        }
    ),
  • Mapping of tool name to handler function in TOOL_HANDLERS dictionary, used by server.call_tool() to dispatch executions.
    # List tools
    TOOL_LIST_PROJECTS: handle_list_projects,
    TOOL_LIST_ISSUES: handle_list_issues,
  • Constant defining the canonical tool name string, used for registration, schemas, and references throughout the codebase.
    TOOL_LIST_PROJECTS = "gitlab_list_projects"
  • Centralized tool schema definition in tool_definitions.TOOLS list (potentially for export/docs), matching server.py implementation.
    types.Tool(
        name=TOOL_LIST_PROJECTS,
        description=desc.DESC_LIST_PROJECTS,
        inputSchema={
            "type": "object",
            "properties": {
                "owned": {"type": "boolean", "description": desc.DESC_OWNED_PROJECTS, "default": False},
                "search": {"type": "string", "description": desc.DESC_SEARCH_TERM + " for projects"},
                "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
            }
        }
    ),
Behavior4/5

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

With no annotations provided, the description carries full burden and does well: it discloses pagination behavior ('Yes (default 20 per page)'), filtering capabilities ('By ownership, name search'), and provides a concrete example response. It doesn't mention authentication needs or rate limits, but covers key operational aspects.

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?

Excellent structure with clear sections: purpose, returns, usage, pagination, filtering, example, and related tools. Every sentence earns its place with zero waste. The information is front-loaded with the core purpose first.

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

Completeness5/5

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

For a list tool with 100% schema coverage and no output schema, the description is complete: it explains what the tool does, when to use it, behavioral traits (pagination, filtering), provides example output, and distinguishes from siblings. No annotations exist, but the description compensates adequately.

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 fully documents all 4 parameters. The description mentions filtering 'By ownership, name search' which aligns with 'owned' and 'search' parameters, but adds no additional semantic value beyond what's 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 'List accessible GitLab projects' with a specific verb ('List') and resource ('GitLab projects'), and distinguishes from siblings by mentioning 'gitlab_get_project' for full details and 'gitlab_search_projects' for broader search. It provides the exact return format and scope.

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?

Explicitly states 'Use when: Browsing projects, finding project IDs' and lists related tools with clear distinctions: 'gitlab_get_project: Get full project details' and 'gitlab_search_projects: Search all GitLab projects'. This gives clear when-to-use guidance and alternatives.

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