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
| Name | Required | Description | Default |
|---|---|---|---|
| issue_iid | Yes | Issue internal ID | |
| project_id | Yes | Project ID or path |
Implementation Reference
- src/handlers/issues.ts:35-46 (handler)The main handler function for the 'get_issue' tool. It takes GetIssueParams (project_id and issue_iid), fetches the issue details from the GitLab API, and returns the data as a JSON-formatted text content block.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)Registers the tool handler dispatch in the main server switch statement, mapping the 'get_issue' tool call to the issueHandlers.getIssue method.case "get_issue": return await this.issueHandlers.getIssue( args as unknown as GetIssueParams );
- src/tools/issues.ts:51-68 (schema)Defines the 'get_issue' tool including its name, description, and input JSON schema for MCP tool listing and 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'], }, },
- src/types.ts:226-229 (schema)TypeScript interface defining the input parameters for the get_issue tool, used for type safety in handlers and server.export interface GetIssueParams { project_id: string; issue_iid: number; }