Skip to main content
Glama

MCP GitLab Server

by Vijay-Duke

gitlab_list_commits

Retrieve and filter repository commits by date range, branch, or file path. View commit history, track specific changes, and paginate results for efficient browsing. Supports auto-detection of GitLab project ID and reference.

Instructions

List repository commits Returns: Array of commits with details Use when: Viewing history, finding specific changes Filtering: By date range, file path, branch Pagination: Yes (default 20 per page)

Example response: [{ "id": "e83c5163316f89bfbde7d9ab23ca2e25604af290", "short_id": "e83c516", "title": "Fix critical bug", "author_name": "John Doe", "committed_date": "2024-01-15T14:30:00Z", "message": "Fix critical bug\n\nDetailed explanation..." }]

Related tools:

  • gitlab_get_commit: Full commit details

  • gitlab_get_commit_diff: See changes

  • gitlab_search_in_project: Search commits

Input Schema

NameRequiredDescriptionDefault
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
pathNoFile path filter for commits Type: string Format: Relative file path Optional: Yes Examples: - 'src/main.py' (commits touching this file) - 'docs/' (commits in docs directory) - 'package.json' (dependency updates) Use case: Track history of specific files
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
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
ref_nameNoGit reference Type: string Format: branch name, tag name, or tag name Optional: Yes - defaults to project's default branch Examples: - 'main' (branch) - 'feature/new-login' (feature branch) - 'v2.0.0' (tag) - 'abc1234' (short tag name) - 'e83c5163316f89bfbde7d9ab23ca2e25604af290' (full SHA) Default: Project's default branch (usually 'main' or 'master')
sinceNoStart date for filtering Type: string Format: ISO 8601 (YYYY-MM-DD or full timestamp) Optional: Yes Examples: - '2024-01-01' (from start of year) - '2024-01-01T00:00:00Z' (with time, UTC) - '2024-01-01T09:00:00+02:00' (with timezone) Timezone: Defaults to UTC if not specified Use case: Filter commits/events after a specific date
untilNoEnd date for filtering Type: string Format: ISO 8601 (YYYY-MM-DD or full timestamp) Optional: Yes Examples: - '2024-12-31' (until end of year) - '2024-12-31T23:59:59Z' (end of day, UTC) - '2024-12-31T17:00:00-05:00' (with timezone) Timezone: Defaults to UTC if not specified Use case: Filter commits/events before a specific date

Input Schema (JSON Schema)

{ "properties": { "page": { "default": 1, "description": "Page number for pagination\nType: integer\nRange: ≥1\nDefault: 1\nExample: 3 (to get the third page of results)\nNote: Use with per_page to navigate large result sets", "minimum": 1, "type": "integer" }, "path": { "description": "File path filter for commits\nType: string\nFormat: Relative file path\nOptional: Yes\nExamples:\n - 'src/main.py' (commits touching this file)\n - 'docs/' (commits in docs directory)\n - 'package.json' (dependency updates)\nUse case: Track history of specific files", "type": "string" }, "per_page": { "default": 50, "description": "Number of results per page\nType: integer\nRange: 1-100\nDefault: 20\nExample: 50 (for faster browsing)\nTip: Use smaller values (10-20) for detailed operations, larger (50-100) for listing", "maximum": 100, "minimum": 1, "type": "integer" }, "project_id": { "description": "Project identifier (auto-detected if not provided)\nType: integer OR string\nFormat: numeric ID or 'namespace/project'\nOptional: Yes - auto-detects from current git repository\nExamples:\n - 12345 (numeric ID)\n - 'gitlab-org/gitlab' (namespace/project path)\n - 'my-group/my-subgroup/my-project' (nested groups)\nNote: If in a git repo with GitLab remote, this can be omitted", "type": "string" }, "ref_name": { "description": "Git reference\nType: string\nFormat: branch name, tag name, or tag name\nOptional: Yes - defaults to project's default branch\nExamples:\n - 'main' (branch)\n - 'feature/new-login' (feature branch)\n - 'v2.0.0' (tag)\n - 'abc1234' (short tag name)\n - 'e83c5163316f89bfbde7d9ab23ca2e25604af290' (full SHA)\nDefault: Project's default branch (usually 'main' or 'master')", "type": "string" }, "since": { "description": "Start date for filtering\nType: string\nFormat: ISO 8601 (YYYY-MM-DD or full timestamp)\nOptional: Yes\nExamples:\n - '2024-01-01' (from start of year)\n - '2024-01-01T00:00:00Z' (with time, UTC)\n - '2024-01-01T09:00:00+02:00' (with timezone)\nTimezone: Defaults to UTC if not specified\nUse case: Filter commits/events after a specific date", "type": "string" }, "until": { "description": "End date for filtering\nType: string\nFormat: ISO 8601 (YYYY-MM-DD or full timestamp)\nOptional: Yes\nExamples:\n - '2024-12-31' (until end of year)\n - '2024-12-31T23:59:59Z' (end of day, UTC)\n - '2024-12-31T17:00:00-05:00' (with timezone)\nTimezone: Defaults to UTC if not specified\nUse case: Filter commits/events before a specific date", "type": "string" } }, "type": "object" }

Other Tools from MCP GitLab Server

Related Tools

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