Skip to main content
Glama

gitlab_get_user_issue_comments

Retrieve all issue comments authored by a specific user across GitLab projects to track engagement, analyze collaboration patterns, and generate participation reports.

Instructions

Get all comments authored by a user on issues

Retrieve all issue comments and notes created by the specified user across all accessible projects and time periods.

Returns comment information with:

  • Comment details: content, timestamp, issue context

  • Issue info: title, state, project association

  • Interaction metrics: replies, reactions, mentions

  • Context: thread position, related discussions

  • Impact: influence on issue resolution

Use cases:

  • Track user engagement in discussions

  • Monitor communication patterns

  • Analyze collaboration effectiveness

  • Generate participation reports

Parameters:

  • user_id: Numeric user ID

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

  • project_id: Optional project scope filter

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

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

  • issue_state: Filter by issue state (opened, closed, all)

  • sort: Sort order (created, updated, project)

  • per_page: Results per page (default: 20)

  • page: Page number (default: 1)

Example: Get recent issue comments

{
  "username": "johndoe",
  "since": "2024-01-01",
  "sort": "created"
}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesUsername string
project_idNoOptional project scope filter
sinceNoComments after date (YYYY-MM-DD)
untilNoComments 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

  • Main execution handler for the gitlab_get_user_issue_comments tool. Extracts parameters and delegates to GitLabClient.get_user_issue_comments().
    def handle_get_user_issue_comments(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> Dict[str, Any]:
        """Handle getting user's issue comments"""
        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_issue_comments(
            username=username,
            project_id=project_id,
            since=since,
            until=until,
            per_page=per_page,
            page=page
        )
  • Input schema definition and tool registration for gitlab_get_user_issue_comments using MCP types.Tool.
    types.Tool(
        name=TOOL_GET_USER_ISSUE_COMMENTS,
        description=desc.DESC_GET_USER_ISSUE_COMMENTS,
        inputSchema={
            "type": "object",
            "properties": {
                "username": {"type": "string", "description": "Username string"},
                "project_id": {"type": "string", "description": "Optional project scope filter"},
                "since": {"type": "string", "description": "Comments after date (YYYY-MM-DD)"},
                "until": {"type": "string", "description": "Comments 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"]
        }
    ),
  • Registration of the handler function in the TOOL_HANDLERS dispatch dictionary used by the MCP server.
    # User's Comments & Discussions handlers
    TOOL_GET_USER_ISSUE_COMMENTS: handle_get_user_issue_comments,
    TOOL_GET_USER_MR_COMMENTS: handle_get_user_mr_comments,
    TOOL_GET_USER_DISCUSSION_THREADS: handle_get_user_discussion_threads,
    TOOL_GET_USER_RESOLVED_THREADS: handle_get_user_resolved_threads,
  • Constant defining the tool name string used across modules.
    TOOL_GET_USER_ISSUE_COMMENTS = "gitlab_get_user_issue_comments"
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses the scope ('across all accessible projects'), time coverage ('all time periods'), and return format details (comment details, issue info, etc.). However, it doesn't mention pagination behavior (implied by parameters but not explained), rate limits, or authentication requirements.

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 purpose, scope, return details, use cases, parameters, and example. However, it could be more front-loaded - the parameter list is extensive and might bury key information. Every sentence adds value, but some redundancy exists between parameter descriptions and schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter tool with no annotations and no output schema, the description provides good context about what the tool does and returns. However, it lacks behavioral details like pagination mechanics, error conditions, or performance characteristics that would help an agent use it effectively.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description lists parameters with brief explanations but doesn't add significant meaning beyond what's in the schema (e.g., it doesn't clarify parameter interactions like 'use either user_id or username' when user_id isn't in the schema). Baseline 3 is appropriate when schema does the heavy lifting.

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', 'Retrieve') and resources ('comments authored by a user on issues', 'issue comments and notes'). It distinguishes from siblings like gitlab_get_issue (which gets issue details) or gitlab_get_user_activity_feed (which is broader).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context with 'across all accessible projects and time periods' and lists specific use cases (track engagement, monitor patterns, etc.). However, it doesn't explicitly state when NOT to use this tool or name alternatives like gitlab_get_user_mr_comments for merge request comments.

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