Skip to main content
Glama

gitlab_list_projects

Retrieve a list of GitLab projects accessible to the user, filtered by membership, ownership, or search criteria, and manage repository interactions efficiently.

Instructions

List GitLab projects accessible to the user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
membershipNoLimit to projects the current user is a member of
ownedNoLimit to projects explicitly owned by the current user
per_pageNoNumber of projects to return per page (max 100)
searchNoSearch projects by name

Implementation Reference

  • The main handler function that implements the gitlab_list_projects tool logic, fetching projects from GitLab API endpoint '/projects' with optional search, owned, membership, and per_page filters.
    export const listProjects: ToolHandler = async (params, context) => {
      const { search, owned, membership, per_page } = params.arguments || {};
      const response = await context.axiosInstance.get('/projects', {
        params: {
          search,
          owned: owned === true ? true : undefined,
          membership: membership === true ? true : undefined,
          per_page: per_page || 20
        }
      });
      
      return formatResponse(response.data);
    };
  • The input schema and metadata definition for the gitlab_list_projects tool.
    name: 'gitlab_list_projects',
    description: 'List GitLab projects accessible to the user',
    inputSchema: {
      type: 'object',
      properties: {
        search: {
          type: 'string',
          description: 'Search projects by name'
        },
        owned: {
          type: 'boolean',
          description: 'Limit to projects explicitly owned by the current user'
        },
        membership: {
          type: 'boolean',
          description: 'Limit to projects the current user is a member of'
        },
        per_page: {
          type: 'number',
          description: 'Number of projects to return per page (max 100)'
        }
      }
    }
  • The registration of the gitlab_list_projects tool in the central toolRegistry, mapping the tool name to its handler function.
    gitlab_list_projects: repoHandlers.listProjects,
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the action but lacks behavioral details: it doesn't mention pagination behavior (implied by 'per_page' parameter but not described), rate limits, authentication requirements, or what 'accessible' means (e.g., based on permissions). This leaves gaps for safe agent operation.

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 a single, clear sentence with zero waste—it directly states the tool's purpose without redundancy. It's front-loaded and appropriately sized for a list tool with good schema coverage.

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

Completeness3/5

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

Given no annotations and no output schema, the description is minimal but adequate for a read-only list tool with full parameter documentation. However, it lacks context on output format (e.g., structure of returned projects) and behavioral traits like pagination or error handling, which could hinder agent effectiveness.

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 parameters are fully documented in the schema. The description adds no additional meaning beyond implying a list operation, which aligns with the schema. Baseline 3 is appropriate as the schema handles parameter details effectively.

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 verb ('List') and resource ('GitLab projects') with the scope 'accessible to the user', which is specific and actionable. It distinguishes from siblings like gitlab_get_project (singular) and gitlab_list_groups (different resource), though it doesn't explicitly contrast with gitlab_list_groups or other list tools.

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 provided on when to use this tool versus alternatives. It doesn't mention when to prefer this over gitlab_list_groups for group-based projects or gitlab_get_project for a specific project, nor does it discuss prerequisites like authentication or context for filtering.

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

Related 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/rifqi96/mcp-gitlab'

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