Skip to main content
Glama

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
NameRequiredDescriptionDefault
labelsNoComma-separated list of label names
project_idYesThe ID or URL-encoded path of the project
stateNoReturn 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);
    };
  • 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,
  • 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']
      }
Behavior2/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 states the action ('List') but does not describe key behaviors such as pagination, rate limits, authentication requirements, or what the output looks like (e.g., format, fields). This leaves significant gaps for an agent to understand how the tool operates.

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 a single, clear sentence that directly states the tool's purpose without any unnecessary words. It is front-loaded and efficiently communicates the core functionality, making it easy to parse and understand immediately.

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

Completeness2/5

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

Given the complexity of a list operation with filtering parameters and no output schema, the description is insufficient. It lacks details on output format, pagination, error handling, and behavioral traits like rate limits. Without annotations or an output schema, the description does not provide enough context for an agent to use the tool effectively.

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?

Schema description coverage is 100%, so the input schema fully documents all parameters (project_id, labels, state) with their types, descriptions, and enum values. The description adds no additional parameter semantics beyond what the schema provides, which meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('List') and resource ('issues in a GitLab project'), making the purpose immediately understandable. However, it does not differentiate this tool from sibling tools like 'gitlab_list_merge_requests' or 'gitlab_list_projects', which follow a similar pattern but target different resources.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention sibling tools like 'gitlab_list_merge_requests' for listing merge requests instead of issues, or specify scenarios where this tool is preferred over others. Usage is implied by the name but not explicitly stated.

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

Related 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/rifqi96/mcp-gitlab'

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