Skip to main content
Glama

list_commits

Read-only

Retrieve repository commits with filters for date, author, path, branch, pagination, and stats. Use it to inspect GitLab commit history without modifying resources.

Instructions

List repository commits with filtering options. For one known resource, use the matching get tool. Read-only; missing resources, denied access, and rate limits return errors. project_id/group_id take a numeric ID or URL-encoded path.

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

A3.7/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnlyHint=true, openWorldHint=true), so the description's "Read-only" earns no credit. It does add value beyond structured data by disclosing failure behavior: missing resources, denied access, and rate limits all surface as errors. Pagination limits are left to the schema.

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?

Four short sentences, front-loaded with the core purpose before the routing hint and error notes. The final project_id/group_id sentence is largely redundant with the schema and carries the erroneous group_id mention, keeping it out of 5 territory.

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?

For a 14-parameter, no-output-schema list tool, the description covers purpose, a sibling alternative, error modes, and ID formatting — enough for correct invocation, with per_page/page limits handled by the schema. The dangling group_id reference is the only real gap.

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 14 parameters and the baseline is 3. The description restates the project_id format (already in the schema) and actually introduces a `group_id` parameter that does not exist in the input schema, which is a minor misleading signal rather than added meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource ("List repository commits") and notes the filtering scope, so an agent can distinguish it from the many get_* and list_* siblings. It falls short of a 5 only because "with filtering options" is generic and the sibling it contrasts with (get_commit) is referred to obliquely as "the matching get tool".

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

Usage Guidelines3/5

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

It gives one routing rule — use the matching get tool for a single known resource — which is genuinely useful, but it never names get_commit and gives no guidance on which filters (path, ref_name, since/until, all) to combine or when to prefer list_branches/get_repository_tree for related lookups. Usage context is implied rather than explicit.

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