Skip to main content
Glama

list_commits

Read-only

List repository commits with filters for author, date, path, branch, and pagination. Read-only access to inspect GitLab commit history.

Instructions

List repository commits with filtering options. Use this for a collection of resources; choose the corresponding get tool when you already know the single resource to inspect. It is read-only and does not mutate GitLab data; missing resources, invalid identifiers, insufficient permission, and rate limits are returned as errors. When project_id or group_id is accepted, provide the numeric ID or complete URL-encoded path described by the schema; use required identifiers and pagination fields exactly as documented.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNoRetrieve every commit from the repository
pageNoPage number for pagination (default: 1)
pathNoThe file path
orderNoList commits in order
sinceNoOnly commits after or on this date are returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ
untilNoOnly commits before or on this date are returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ
authorNoSearch commits by commit author
jmespathNoOptional JMESPath expression filtering the JSON result before return.
per_pageNoNumber of items per page (max: 100, default: 20)
ref_nameNoThe name of a repository branch, tag or revision range, or if not given the default branch
trailersNoParse and include Git trailers for every commit
project_idYesProject ID or complete URL-encoded path to project
with_statsNoStats about each commit are added to the response
first_parentNoFollow only the first parent commit upon seeing a merge commit

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.66
    • addedInput schema / properties / jmespath
      Added value: +{
      +  "description": "Optional JMESPath expression filtering the JSON result before return.",
      +  "type": "string"
      +}
  2. Addedv2.1.45
  3. Removedv2.1.43
  4. Addedv2.1.18
  5. Removedv2.1.14
  6. Addedv2.1.11
  7. Removedv2.1.10
  8. Changed2 schema fields changedv2.1.9
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / required
      Added value: +[
      +  "project_id"
      +]
  9. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description goes beyond that by enumerating failure modes (missing resources, invalid identifiers, insufficient permission, and rate limits returned as errors). It does not describe response shape or pagination internals, but the added error behavior is meaningful.

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?

Three sentences are front-loaded with the core action and usage rule, then safety and error details. The last sentence is slightly redundant ('described by the schema' and 'exactly as documented') but the overall length is tight and focused.

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

Completeness4/5

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

Covers purpose, usage boundary, read-only safety, error behavior, and identifier/pagination care, which is enough for a list operation without an output schema. The group_id reference is a flaw, and the description does not explain filter interactions, leaving minor gaps for a 14-parameter tool.

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

Parameters2/5

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

The schema already covers all 14 parameters, so the bar for added meaning is modest. However, the description's identifier guidance mostly repeats the schema, and its claim that 'project_id or group_id is accepted' is not supported by the schema, which lists only project_id. This makes the parameter guidance partially misleading.

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?

States a specific verb and resource: 'List repository commits with filtering options.' It explicitly positions this tool as the collection-level operation and distinguishes it from the corresponding get tool for a single resource, so an agent can tell it apart from get_commit and similar siblings.

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

Usage Guidelines5/5

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

Directly says when to use this tool ('Use this for a collection of resources') and when to choose an alternative ('choose the corresponding get tool when you already know the single resource to inspect'). It also adds operational context: read-only behavior, error conditions, and identifier/pagination care.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools