Skip to main content
Glama
Alosies

GitLab MCP Server

by Alosies

get_project

Retrieve detailed information about a specific GitLab project by providing its ID or path to access project data and settings.

Instructions

Get details of a specific project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID or path (e.g., "1" or "group/project")

Implementation Reference

  • The main handler function for the 'get_project' tool. It fetches the project details from the GitLab API using the provided project_id and returns the JSON response.
    async getProject(args: GetProjectParams) {
      const data = await this.client.get(`/projects/${encodeURIComponent(args.project_id)}`);
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(data, null, 2),
          },
        ],
      };
    }
  • Tool definition including name, description, and input schema for 'get_project'.
    {
      name: 'get_project',
      description: 'Get details of a specific project',
      inputSchema: {
        type: 'object',
        properties: {
          project_id: {
            type: 'string',
            description: 'Project ID or path (e.g., "1" or "group/project")',
          },
        },
        required: ['project_id'],
      },
    },
  • src/server.ts:157-160 (registration)
    Dispatch/registration of the 'get_project' tool call to the projectHandlers.getProject method.
    case "get_project":
      return await this.projectHandlers.getProject(
        args as unknown as GetProjectParams
      );
  • Type definition for the input parameters of the get_project tool.
    export interface GetProjectParams {
      project_id: string;
    }

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/Alosies/gitlab-mcp-server'

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