gitlab_get_merge_request_notes
Retrieve and manage merge request comments on GitLab projects. Supports pagination, sorting by date, and customizable result length for efficient review of MR discussions and feedback.
Instructions
List merge request comments Returns: Array of notes/comments with content Use when: Reading MR discussions, reviews Pagination: Yes (default 10 per page) Sorting: By created_at or updated_at
Example response: [{ "id": 789, "body": "Great work! Just one suggestion...", "author": {"username": "reviewer"}, "created_at": "2024-01-15T10:30:00Z", "type": "DiffNote", "resolvable": true, "resolved": false }]
Related tools:
gitlab_get_merge_request_discussions: Threaded discussions
gitlab_add_merge_request_comment: Add comment
gitlab_resolve_discussion: Resolve threads
Input Schema
Name | Required | Description | Default |
---|---|---|---|
max_body_length | No | Maximum length for text content Type: integer Range: 0-10000 (0 = unlimited) Default: 1000 Examples: - 0: Show full content (no truncation) - 500: Limit to 500 characters - 2000: Allow longer descriptions Note: Truncated text ends with '...' | |
mr_iid | Yes | Merge 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 | |
order_by | No | Field to sort by Type: string (enum) Options vary by endpoint: - Commits: 'created_at', 'title' - Issues: 'created_at', 'updated_at', 'priority', 'due_date' - MRs: 'created_at', 'updated_at', 'title' Default: Usually 'created_at' Example: 'updated_at' to see recently modified items first | created_at |
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 | |
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 | |
project_id | No | Project 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 | |
sort | No | Sort direction Type: string (enum) Options: 'asc' | 'desc' Default: Varies by context (usually 'desc' for time-based) Examples: - 'asc': A→Z, oldest→newest, smallest→largest - 'desc': Z→A, newest→oldest, largest→smallest | asc |