Skip to main content
Glama

gitlab_list_issues

List project issues from GitLab to browse work items, filter by state (opened/closed/all), and view details like title, labels, assignees, and status with pagination support.

Instructions

List project issues Returns: Array of issues with details Use when: Browsing issues, finding work items Filtering: By state (opened/closed/all) Pagination: Yes (default 20 per page)

Example response: [{ "iid": 123, "title": "Fix login bug", "state": "opened", "labels": ["bug", "high-priority"], "assignees": [{"username": "johndoe"}], "web_url": "https://gitlab.com/group/project/-/issues/123" }]

Related tools:

  • gitlab_get_issue: Get full issue details

  • gitlab_add_issue_comment: Comment on issue

  • gitlab_search_in_project: Search issue content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoProject identifier (auto-detected if not provided) Type: integer OR string Format: numeric ID or 'namespace/project' Optional: Yes - auto-detects from current git repository Examples: - 12345 (numeric ID) - 'gitlab-org/gitlab' (namespace/project path) - 'my-group/my-subgroup/my-project' (nested groups) Note: If in a git repo with GitLab remote, this can be omitted
stateNoIssue state filter Type: string (enum) Options: 'opened' | 'closed' | 'all' Default: 'all' Examples: - 'opened' (only open issues) - 'closed' (only closed issues) - 'all' (both open and closed) Use case: Filter to see only active work itemsopened
per_pageNoNumber of results per page Type: integer Range: 1-100 Default: 20 Example: 50 (for faster browsing) Tip: Use smaller values (10-20) for detailed operations, larger (50-100) for listing
pageNoPage number for pagination Type: integer Range: ≥1 Default: 1 Example: 3 (to get the third page of results) Note: Use with per_page to navigate large result sets

Implementation Reference

  • The main handler function that implements the gitlab_list_issues tool logic. It resolves the project ID (auto-detecting from git if not provided), extracts pagination and state parameters, and calls the GitLab client's get_issues method.
    def handle_list_issues(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> Dict[str, Any]:
        """Handle listing issues"""
        project_id = require_project_id(client, arguments)
        state = get_argument(arguments, "state", "opened")
        per_page = get_argument(arguments, "per_page", DEFAULT_PAGE_SIZE)
        page = get_argument(arguments, "page", 1)
        
        return client.get_issues(project_id, state, per_page, page)
  • Pydantic/MCP schema definition for the gitlab_list_issues tool, including input parameters (project_id, state, per_page, page) with descriptions, types, enums, defaults, and constraints.
        name=TOOL_LIST_ISSUES,
        description=desc.DESC_LIST_ISSUES,
        inputSchema={
            "type": "object",
            "properties": {
                "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                "state": {"type": "string", "description": desc.DESC_STATE_ISSUE, "enum": ["opened", "closed", "all"], "default": "opened"},
                "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
            }
        }
    ),
  • Registration of the gitlab_list_issues tool in the TOOL_HANDLERS dictionary, mapping the tool name (TOOL_LIST_ISSUES) to its handler function handle_list_issues.
    TOOL_LIST_ISSUES: handle_list_issues,
    TOOL_LIST_MRS: handle_list_merge_requests,
  • Constant definition for the tool name 'gitlab_list_issues', used consistently across handler registration, schema definitions, and tests.
    TOOL_LIST_ISSUES = "gitlab_list_issues"
  • Helper function used by the handler to resolve project_id either from arguments or by auto-detecting from the current git repository.
    def require_project_id(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> str:
        """Get project_id or raise error if not found"""
        project_id = get_project_id_or_detect(client, arguments)
        if not project_id:
            raise ValueError(ERROR_NO_PROJECT)
        return project_id
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: it mentions filtering capabilities ('By state (opened/closed/all)'), pagination ('Yes (default 20 per page)'), and includes an example response structure. However, it doesn't cover potential rate limits, authentication requirements, or error conditions, leaving some behavioral aspects unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded with key information (purpose, returns, usage, filtering, pagination), followed by an example and related tools. Every sentence earns its place by providing essential guidance without redundancy, making it highly efficient and easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (list operation with filtering/pagination), no annotations, and no output schema, the description does a good job by covering purpose, usage, behaviors, and providing an example response. However, it lacks details on error handling or advanced filtering options (e.g., by labels or assignees), which could enhance completeness for a list tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already fully documents all four parameters. The description adds minimal value beyond the schema by mentioning filtering by state and pagination, but doesn't provide additional syntax, format details, or usage nuances. This meets the baseline of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('List') and resource ('project issues'), distinguishing it from siblings like 'gitlab_get_issue' (for detailed view) and 'gitlab_search_in_project' (for content search). It explicitly mentions the return type ('Array of issues with details'), making the purpose unambiguous and well-differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance with a 'Use when:' section ('Browsing issues, finding work items') and lists related tools with their specific purposes ('gitlab_get_issue: Get full issue details', 'gitlab_add_issue_comment: Comment on issue', 'gitlab_search_in_project: Search issue content'). This clearly indicates when to use this tool versus alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/Vijay-Duke/mcp-gitlab'

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