Skip to main content
Glama

Get Commit History

get_commit_history
Read-onlyIdempotent

Retrieve the current repository's commit history with optional filters by branch, file path, date, scope, and impact, helping you audit changes and trace project context.

Instructions

Retrieve commit history for the current repository

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_commit_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoGit reference (branch, tag, commit). Default: HEAD
pathNoFilter by specific file or directory path
scopeNoFilter commits by a specific scope
sinceNoShow commits more recent than a specific date (e.g. "2023-01-01")
sortByNoSort commits by date or impact score
maxCountNoMaximum number of commits to return. Default: 50
use_test_dbNo
techDebtAuditNoFilter for high impact commits with low trust or missing validation

Output Schema

NameRequiredDescriptionDefault
codeNoError code (e.g. VALIDATION_ERROR, INTERNAL_ERROR)
errorNoHuman-readable error message
commitsNo
detailsNoAdditional error context
successYes
categoryNoError category (validation, query, connection, internal)
changelogNo
suggestionNoSuggested fix for the error
recoverableNoWhether the error is recoverable
aggregated_errorsNoDetails of individual errors in a multi-step operation

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv9.1.0
    • changedInput schema / properties / maxCount / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "string"
      +]
    • removedInput schema / properties / sortBy / enum
      Removed value: -[
      -  "date",
      -  "impact"
      -]
  2. First observedv9.0.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so the safety profile is covered by structured data rather than the prose. The description contributes only the 'current repository' scoping fact; it says nothing about defaults (maxCount 50, ref HEAD), pagination, ordering behavior, or the cost of techDebtAudit overrides.

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?

A single front-loaded sentence with zero redundant wording. It is efficient, though it is arguably undersized for a tool exposing eight filtering parameters.

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?

An output schema exists, so return values need not be described, and all parameters are optional. However, for a commit-listing tool with non-obvious filters like techDebtAudit and scope, the description omits how filters combine, what the default window is, and how results are ordered.

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 88%, so the schema already explains ref, path, scope, since, sortBy, maxCount, and techDebtAudit. The description adds no filtering or syntax detail beyond that, and the undocumented use_test_db parameter is left unexplained in both places. Baseline 3 is appropriate when the schema carries the parameter burden.

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?

States a specific verb and resource (retrieve commit history) and constrains it to the current repository, so an agent knows exactly what is fetched. It does not distinguish this from close siblings such as search_commits, analyze_commit_patterns, or get_unreleased_commits, which would require reading the schema to tell apart.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no exclusions, and no mention of the alternatives in the sibling list. The agent is left to infer that this is a browse/list operation versus search_commits or analyze_commit_patterns from the name alone.

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