Skip to main content
Glama

gitlab_get_issue

Retrieve complete GitLab issue details including description, labels, milestone, and time tracking data to analyze project tasks and track progress.

Instructions

Get complete issue details Returns: Full issue data including description, comments count Use when: Need complete issue information Required: Issue IID (e.g., 123 for issue #123)

What's IID?: Internal ID - the issue number shown in GitLab Example: For issue #123, use iid=123

Returns: { "iid": 123, "title": "Fix login bug", "description": "Detailed bug description...", "state": "opened", "labels": ["bug"], "milestone": {"title": "v2.0"}, "time_stats": { "time_estimate": 7200, "total_time_spent": 3600 } }

Related tools:

  • gitlab_list_issues: Find issues

  • gitlab_add_issue_comment: Add comment

  • gitlab_update_issue: Modify issue

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
issue_iidYesIssue number (IID - Internal ID) Type: integer Format: Project-specific issue number (without #) Required: Yes Examples: - 123 (for issue #123) - 4567 (for issue #4567) How to find: Look at issue URL or title - URL: https://gitlab.com/group/project/-/issues/123 → use 123 - Title: "Fix login bug (#123)" → use 123 Note: This is NOT the global issue ID

Implementation Reference

  • The core handler function that implements the logic for the 'gitlab_get_issue' tool. It determines the project ID using git detection if not provided, requires the 'issue_iid' argument, and calls the GitLab client's get_issue method to fetch the issue details.
    def handle_get_issue(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> Dict[str, Any]:
        """Handle getting single issue"""
        project_id = require_project_id(client, arguments)
        issue_iid = require_argument(arguments, "issue_iid")
        
        return client.get_issue(project_id, issue_iid)
  • The input schema and metadata definition for the 'gitlab_get_issue' tool, specifying that 'issue_iid' is required (integer) and 'project_id' is optional (string). This is used for MCP tool registration.
    types.Tool(
        name=TOOL_GET_ISSUE,
        description=desc.DESC_GET_ISSUE,
        inputSchema={
            "type": "object",
            "properties": {
                "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                "issue_iid": {"type": "integer", "description": desc.DESC_ISSUE_IID}
            },
            "required": ["issue_iid"]
        }
    ),
  • The registration mapping that associates the tool name 'gitlab_get_issue' (via TOOL_GET_ISSUE constant) with its handler function 'handle_get_issue'. This dict is used by the MCP server to dispatch tool calls.
    TOOL_GET_ISSUE: handle_get_issue,
  • Constant definition for the tool name 'gitlab_get_issue', used consistently across handler registration, schemas, and descriptions.
    TOOL_GET_ISSUE = "gitlab_get_issue"
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 the tool's behavior by specifying what it returns ('Full issue data including description, comments count'), providing a detailed example output, and explaining the IID parameter. However, it doesn't mention potential errors, rate limits, or authentication needs, leaving some behavioral aspects uncovered.

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

Conciseness4/5

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

The description is well-structured with clear sections (e.g., 'Returns:', 'Use when:', 'Required:', 'What's IID?:', 'Example:', 'Related tools:'), making it easy to scan. It's appropriately sized, though the detailed example output is lengthy but informative. Every sentence adds value, with no redundant information.

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 (2 parameters, no output schema, no annotations), the description is quite complete. It covers purpose, usage, parameters, and example output, but lacks details on error handling, authentication, or rate limits. The absence of an output schema is mitigated by the example return structure, though not fully.

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

Parameters4/5

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

The schema description coverage is 100%, so the baseline is 3. The description adds value by explaining the 'issue_iid' parameter in detail ('What's IID?: Internal ID - the issue number shown in GitLab') with examples, clarifying its semantics beyond the schema. However, it doesn't provide similar elaboration for 'project_id', which is auto-detected but could benefit from more context.

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 specific verbs ('Get complete issue details') and resources ('issue'), and explicitly distinguishes it from sibling tools like 'gitlab_list_issues' (for finding issues) and 'gitlab_update_issue' (for modifying issues). The title 'Get complete issue details' reinforces this specificity.

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 ('Need complete issue information'), lists required parameters ('Required: Issue IID'), and names related tools with their purposes (e.g., 'gitlab_list_issues: Find issues'). 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