Skip to main content
Glama

gitlab_resolve_discussion

Resolve a GitLab merge request discussion thread by marking it as resolved when code review feedback is addressed. Requires the discussion ID and merge request number for targeted action.

Instructions

Resolve a discussion thread Returns: Updated discussion Use when: Code review feedback addressed Required: Discussion ID from get_discussions

Related tools:

  • gitlab_get_merge_request_discussions: Find discussions

  • gitlab_add_merge_request_comment: Add resolution comment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
discussion_idYesDiscussion thread ID Type: string Required: Yes Format: SHA-like identifier How to get: From gitlab_get_merge_request_discussions Example: '6a9c1750b37d513a43987b574953fceb50b03ce7' Use case: Resolve specific discussion thread
mr_iidYesMerge request number (IID - Internal ID) Type: integer Format: Project-specific MR number (without !) Required: Yes Examples: - 456 (for MR !456) - 7890 (for MR !7890) How to find: Look at MR URL or title - URL: https://gitlab.com/group/project/-/merge_requests/456 → use 456 - Title: "Add new feature (!456)" → use 456 Note: This is NOT the global MR 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_resolve_discussion tool. It extracts project_id, mr_iid, and discussion_id from arguments and calls the GitLabClient's resolve_discussion method.
    def handle_resolve_discussion(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> Dict[str, Any]: """Handle resolving a discussion""" project_id = require_project_id(client, arguments) mr_iid = require_argument(arguments, "mr_iid") discussion_id = require_argument(arguments, "discussion_id") return client.resolve_discussion(project_id, mr_iid, discussion_id)
  • Defines the tool schema including input parameters (project_id, mr_iid, discussion_id) and requirements for the gitlab_resolve_discussion tool.
    types.Tool( name=TOOL_RESOLVE_DISCUSSION, description=desc.DESC_RESOLVE_DISCUSSION, inputSchema={ "type": "object", "properties": { "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID}, "mr_iid": {"type": "integer", "description": desc.DESC_MR_IID}, "discussion_id": {"type": "string", "description": desc.DESC_DISCUSSION_ID} }, "required": ["mr_iid", "discussion_id"] } ),
  • Registers the tool name TOOL_RESOLVE_DISCUSSION ('gitlab_resolve_discussion') to its handler function in the TOOL_HANDLERS dictionary, which is used by the server to dispatch tool calls.
    TOOL_RESOLVE_DISCUSSION: handle_resolve_discussion,
  • Defines the constant string for the tool name used throughout the codebase.
    TOOL_RESOLVE_DISCUSSION = "gitlab_resolve_discussion"

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