Skip to main content
Glama

gitlab_get_user_resolved_threads

Retrieve discussion threads resolved by a specific user in GitLab code reviews to track review effectiveness, assess collaboration quality, and gain team productivity insights.

Instructions

Get threads resolved by a user in reviews

Find all discussion threads that were resolved by the specified user during code reviews and collaborative processes.

Returns resolved thread information with:

  • Thread details: original discussion, resolution

  • Resolution info: how thread was closed, outcome

  • Context: code changes, review process, participants

  • Timeline: discussion duration, resolution time

  • Impact: contribution to code quality and decisions

Use cases:

  • Code review effectiveness tracking

  • Collaboration quality assessment

  • Mentoring and guidance evaluation

  • Team productivity insights

Parameters:

  • user_id: Numeric user ID

  • username: Username string (use either user_id or username)

  • project_id: Optional project scope filter

  • resolution_type: How thread was resolved

  • since: Resolved after date (YYYY-MM-DD)

  • until: Resolved before date (YYYY-MM-DD)

  • context_type: Filter by context (MergeRequest, Issue, all)

  • sort: Sort order (resolved, created, impact)

  • per_page: Results per page (default: 20)

  • page: Page number (default: 1)

Example: Get threads resolved in code reviews

{ "username": "johndoe", "context_type": "MergeRequest", "since": "2024-01-01", "sort": "resolved" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesUsername string
project_idNoOptional project scope filter
sinceNoThreads resolved after date (YYYY-MM-DD)
untilNoThreads resolved before date (YYYY-MM-DD)
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 core handler function for the gitlab_get_user_resolved_threads tool. It validates input arguments (requiring 'username') and delegates to the GitLabClient's get_user_resolved_threads method to fetch the data.
    def handle_get_user_resolved_threads(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> Dict[str, Any]: """Handle getting user's resolved threads""" username = get_argument(arguments, "username") if not username: raise ValueError("username is required") project_id = get_argument(arguments, "project_id") since = get_argument(arguments, "since") until = get_argument(arguments, "until") per_page = get_argument(arguments, "per_page", DEFAULT_PAGE_SIZE) page = get_argument(arguments, "page", 1) return client.get_user_resolved_threads( username=username, project_id=project_id, since=since, until=until, per_page=per_page, page=page )
  • Registers the handler function for this tool in the TOOL_HANDLERS dictionary, which is used by the MCP server's call_tool dispatcher to route tool calls to the appropriate handler.
    TOOL_GET_USER_DISCUSSION_THREADS: handle_get_user_discussion_threads, TOOL_GET_USER_RESOLVED_THREADS: handle_get_user_resolved_threads, }
  • Defines the tool's input schema and metadata in the server's list_tools() handler, which is returned to MCP clients describing available tools and their parameters.
    name=TOOL_GET_USER_RESOLVED_THREADS, description=desc.DESC_GET_USER_RESOLVED_THREADS, inputSchema={ "type": "object", "properties": { "username": {"type": "string", "description": "Username string"}, "project_id": {"type": "string", "description": "Optional project scope filter"}, "since": {"type": "string", "description": "Threads resolved after date (YYYY-MM-DD)"}, "until": {"type": "string", "description": "Threads resolved before date (YYYY-MM-DD)"}, "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} }, "required": ["username"] } )
  • Alternative/duplicate tool schema definition, possibly used in tests or documentation.
    name=TOOL_GET_USER_RESOLVED_THREADS, description=desc.DESC_GET_USER_RESOLVED_THREADS, inputSchema={ "type": "object", "properties": { "username": {"type": "string", "description": "Username string"}, "project_id": {"type": "string", "description": "Optional project scope filter"}, "since": {"type": "string", "description": "Threads resolved after date (YYYY-MM-DD)"}, "until": {"type": "string", "description": "Threads resolved before date (YYYY-MM-DD)"}, "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} }, "required": ["username"] } )
  • The MCP server's call_tool handler dispatches tool execution by looking up the tool name in TOOL_HANDLERS and invoking the corresponding function with the GitLab client and arguments.
    handler = TOOL_HANDLERS.get(name) if not handler: raise ValueError(f"Unknown tool: {name}") # Execute the handler result = handler(client, arguments)

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