Skip to main content
Glama

review_git_diff

Analyze git code changes automatically using AI to identify issues and provide structured findings with confidence scores for staged, unstaged, or branch comparisons.

Instructions

Review code changes from git automatically.

This tool combines git diff retrieval with AI-powered code review. It automatically:

  1. Retrieves the diff from git based on the target

  2. Analyzes the changes for issues

  3. Returns structured findings with confidence scores

Target Options:

  • 'staged' (default): Review staged changes (git diff --staged)

  • 'unstaged': Review unstaged working directory changes

  • 'head': Review all uncommitted changes (staged + unstaged)

  • '': Review changes compared to a branch (e.g., 'main')

  • '': Review a specific commit

Example usage:

  • Review staged changes: { "target": "staged" }

  • Review against main: { "target": "main" }

  • Review a commit: { "target": "abc1234" }

  • Review feature branch: { "target": "feature/login", "base": "main" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNoTarget to review: 'staged', 'unstaged', 'head', branch name, or commit hash. Default: 'staged'staged
baseNoBase reference for branch comparisons (e.g., main, develop)
include_patternsNoFile patterns to include in review (glob patterns)
optionsNoReview options (same as review_changes tool)

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/Kirachon/context-engine'

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