Skip to main content
Glama
Alosies

GitLab MCP Server

by Alosies

get_issue

Retrieve detailed information about a specific GitLab issue by providing the project identifier and issue internal ID.

Instructions

Get details of a specific issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID or path
issue_iidYesIssue internal ID

Implementation Reference

  • The main handler function that fetches the issue details from GitLab API and returns formatted response.
    async getIssue(args: GetIssueParams) {
      const data = await this.client.get(`/projects/${encodeURIComponent(args.project_id)}/issues/${args.issue_iid}`);
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(data, null, 2),
          },
        ],
      };
    }
  • src/server.ts:167-170 (registration)
    Switch case registration that dispatches tool calls to the issueHandlers.getIssue method.
    case "get_issue":
      return await this.issueHandlers.getIssue(
        args as unknown as GetIssueParams
      );
  • MCP tool definition including name, description, and input schema for validation.
      name: 'get_issue',
      description: 'Get details of a specific issue',
      inputSchema: {
        type: 'object',
        properties: {
          project_id: {
            type: 'string',
            description: 'Project ID or path',
          },
          issue_iid: {
            type: 'number',
            description: 'Issue internal ID',
          },
        },
        required: ['project_id', 'issue_iid'],
      },
    },
  • TypeScript interface defining the parameters for the get_issue tool.
    export interface GetIssueParams {
      project_id: string;
      issue_iid: number;
    }

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