Skip to main content
Glama
Alosies
by Alosies

list_issues

Retrieve and filter issues from a GitLab project by state, labels, assignee, author, or search terms to track and manage project tasks.

Instructions

List issues in a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assignee_idNoFilter by assignee user ID
author_idNoFilter by author user ID
labelsNoComma-separated list of labels
per_pageNoNumber of results per page (max 100)
project_idYesProject ID or path
scopeNoReturn issues with the given scope (optional)
searchNoSearch issues by title and description
stateNoFilter by issue stateopened

Implementation Reference

  • The handler function that executes the list_issues tool, constructing query params and fetching issues from GitLab API.
    async listIssues(args: ListIssuesParams) { const params = new URLSearchParams(); if (args.state) params.append('state', args.state); if (args.labels) params.append('labels', args.labels); if (args.assignee_id) params.append('assignee_id', String(args.assignee_id)); if (args.author_id) params.append('author_id', String(args.author_id)); if (args.search) params.append('search', args.search); // Only add scope if explicitly provided by user if (args.scope) params.append('scope', args.scope); params.append('per_page', String(args.per_page || 20)); const data = await this.client.get(`/projects/${encodeURIComponent(args.project_id)}/issues?${params.toString()}`); return { content: [ { type: 'text', text: JSON.stringify(data, null, 2), }, ], }; }
  • JSON schema defining the input parameters for the list_issues tool.
    inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'Project ID or path', }, state: { type: 'string', enum: ['opened', 'closed', 'all'], description: 'Filter by issue state', default: 'opened', }, labels: { type: 'string', description: 'Comma-separated list of labels', }, assignee_id: { type: 'number', description: 'Filter by assignee user ID', }, author_id: { type: 'number', description: 'Filter by author user ID', }, search: { type: 'string', description: 'Search issues by title and description', }, scope: { type: 'string', enum: ['created_by_me', 'assigned_to_me', 'all'], description: 'Return issues with the given scope (optional)', }, per_page: { type: 'number', description: 'Number of results per page (max 100)', maximum: 100, default: 20, }, }, required: ['project_id'], },
  • src/server.ts:163-166 (registration)
    Tool call dispatch/registration in the MCP server switch statement.
    case "list_issues": return await this.issueHandlers.listIssues( args as unknown as ListIssuesParams );
  • TypeScript interface for ListIssuesParams providing type definitions matching the tool schema.
    export interface ListIssuesParams { project_id: string; state?: 'opened' | 'closed' | 'all'; labels?: string; assignee_id?: number; author_id?: number; search?: string; scope?: 'created_by_me' | 'assigned_to_me' | 'all'; per_page?: number; }
  • Tool object definition exported for inclusion in the MCP tools list via allTools.
    { name: 'list_issues', description: 'List issues in a project', inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'Project ID or path', }, state: { type: 'string', enum: ['opened', 'closed', 'all'], description: 'Filter by issue state', default: 'opened', }, labels: { type: 'string', description: 'Comma-separated list of labels', }, assignee_id: { type: 'number', description: 'Filter by assignee user ID', }, author_id: { type: 'number', description: 'Filter by author user ID', }, search: { type: 'string', description: 'Search issues by title and description', }, scope: { type: 'string', enum: ['created_by_me', 'assigned_to_me', 'all'], description: 'Return issues with the given scope (optional)', }, per_page: { type: 'number', description: 'Number of results per page (max 100)', maximum: 100, default: 20, }, }, required: ['project_id'], }, },

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