gitlab_list_issues
Retrieve and list issues from a GitLab project by specifying project ID, optional labels, and issue state (opened or closed).
Instructions
List issues in a GitLab project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| labels | No | Comma-separated list of label names | |
| project_id | Yes | The ID or URL-encoded path of the project | |
| state | No | Return issues with specified state (opened, closed) |
Implementation Reference
- The main handler function that implements the gitlab_list_issues tool. It fetches issues from a GitLab project using the API endpoint /projects/{project_id}/issues with optional state and labels parameters.export const listIssues: ToolHandler = async (params, context) => { const { project_id, state, labels } = params.arguments || {}; if (!project_id) { throw new McpError(ErrorCode.InvalidParams, 'project_id is required'); } const response = await context.axiosInstance.get( `/projects/${encodeURIComponent(String(project_id))}/issues`, { params: { state, labels } } ); return formatResponse(response.data); };
- src/utils/tool-registry.ts:33-33 (registration)Registration of the gitlab_list_issues tool in the central tool registry, mapping the tool name to the repoHandlers.listIssues handler function.gitlab_list_issues: repoHandlers.listIssues,
- src/utils/tools-data.ts:198-219 (schema)The input schema definition for the gitlab_list_issues tool, specifying parameters like project_id (required), state, and labels.{ name: 'gitlab_list_issues', description: 'List issues in a GitLab project', inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'The ID or URL-encoded path of the project' }, state: { type: 'string', description: 'Return issues with specified state (opened, closed)', enum: ['opened', 'closed'] }, labels: { type: 'string', description: 'Comma-separated list of label names' } }, required: ['project_id'] }