Skip to main content
Glama

Git Log For PR

git_log_for_pr
Read-onlyIdempotent

List commits on the current branch since a base branch to generate pull request titles and descriptions.

Instructions

List commits on the current branch since the base branch, for writing a PR title/body (the aipr workflow).

If base is omitted, it is auto-detected (origin/HEAD, else main/master). Read-only.

Args:

  • base (string, optional): base branch/ref to compare against

  • repo_path (string, optional): repository path (default: server cwd)

Returns JSON: { base, count, commits: [{ sha, subject, body }] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseNoBase branch/ref
repo_pathNoPath to the git repository. Defaults to the server's working directory.
Behavior4/5

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

Annotations already mark readOnlyHint, destructiveHint, idempotentHint. The description adds valuable auto-detection behavior and return format details, which go beyond the annotations. No contradiction.

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?

Four sentences with no wasted words. The purpose is front-loaded, and each sentence adds distinct value. The structure is efficient and easy to parse.

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

Completeness5/5

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

Given the low complexity (2 params, no output schema), the description covers the use case, auto-detection, read-only nature, and return format. It provides enough context for correct invocation without gaps.

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

Parameters4/5

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

Schema coverage is 100%, but the description adds extra meaning: base can be auto-detected, repo_path defaults to server cwd, and the args section clarifies optionality. This helps the agent understand parameter behavior beyond the schema.

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?

The description clearly states the tool lists commits on the current branch since the base branch, and explicitly ties it to the PR title/body workflow. This specificity distinguishes it from sibling tools like git_status or git_commit.

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

Usage Guidelines4/5

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

The description includes the use case ('for writing a PR title/body') and explains auto-detection of base if omitted. While it doesn't provide explicit 'when not to use' guidance, the context is sufficient for an agent to decide appropriately among siblings.

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

Install Server

Other Tools

Latest Blog Posts

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/BenBen2109/ai-git-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server