Skip to main content
Glama

git_log

Read-onlyIdempotent

Retrieve the last N commits for a repository as structured data, including SHA, author, date, and message.

Instructions

Return the last N commits for a repository as structured data (sha, author, date, message).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repo": "<repo>"
    },
    "name": "git_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
nNoNumber of commits to return (1–100)
refNoBranch, tag, or SHA to start from (default: HEAD)HEAD
repoYesRepository name from list_repositories(), e.g. "pypto"

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/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 fully covered without help from the description. The description adds only the shape of the result (sha, author, date, message) and the "last N" ordering implication; it says nothing about behavior on an invalid ref, unknown repo, or truncation at the 100-commit cap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler; the resource, scope, and output shape come in one pass. Every clause carries information.

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?

The tool is simple, all three parameters are fully described in the schema, and an output schema exists so return values need no explanation. Slight redundancy in re-listing output fields and the absence of any error/edge-case note keeps it from a 5.

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 repo, ref, and n (including the 1–100 bounds and defaults) are already documented in the schema. The description restates the N notion but adds no syntax or formatting detail beyond the structured fields, making the baseline 3 appropriate.

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 names a specific verb and resource ("Return the last N commits for a repository") and lists the returned fields (sha, author, date, message), so the operation is unambiguous. It does not distinguish itself from the nearest sibling git_diff, but the purpose itself is clear.

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?

Usage is implied by the operation: fetch a history listing for a repo starting at a ref. There is no explicit statement of when to prefer this over git_diff or other inspection tools, and no preconditions or exclusions are given.

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