Skip to main content
Glama

gitlab_get_issue

Retrieve complete details of a specific issue from GitLab, including its description, comments count, and time statistics, using the issue's internal ID (IID).

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
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
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

Implementation Reference

  • The handler function that implements the core logic for the gitlab_get_issue tool. It detects or requires the project ID, requires the issue IID, and calls the GitLabClient 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)
  • Defines the MCP tool schema including name, description, and input schema (requires issue_iid, optional project_id).
    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"] } ),
  • Registers the handle_get_issue function to the TOOL_GET_ISSUE name in the TOOL_HANDLERS dictionary used by the MCP server.
    TOOL_GET_ISSUE: handle_get_issue, TOOL_GET_MERGE_REQUEST: handle_get_merge_request,
  • Defines the constant string name for the gitlab_get_issue tool used across the codebase.
    TOOL_GET_ISSUE = "gitlab_get_issue"
  • Registers the gitlab_get_issue tool in the MCP server's list_tools() method with schema and description.
    types.Tool( name="gitlab_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"] } ),

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

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