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
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | Username string | |
| project_id | No | Optional project scope filter | |
| since | No | Threads resolved after date (YYYY-MM-DD) | |
| until | No | Threads resolved before date (YYYY-MM-DD) | |
| per_page | No | Number 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 | |
| page | No | Page 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
- src/mcp_gitlab/tool_handlers.py:980-999 (handler)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 )
- src/mcp_gitlab/tool_handlers.py:1095-1097 (registration)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, }
- src/mcp_gitlab/server.py:1224-1238 (schema)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"] } )
- src/mcp_gitlab/server.py:1251-1256 (registration)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)