Skip to main content
Glama

ck_git_diff

Generate a validated git diff between two refs or against HEAD, returning diff text and ControlKeel validation findings for pre-commit review.

Instructions

Generate a git diff and run CK validation on the resulting diff. Read-only — no commits are created. base_ref and head_ref are git refs (branch names, commit SHAs, or tags); omit both or pass empty strings to diff the working tree against HEAD. Returns the diff text and any CK validation findings raised against it. Use ck_git_diff to review changes before committing or submitting a review. Use ck_git_status for a summary without the full diff. Use ck_git_commit to create the commit after reviewing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_refNoBase git ref (commit, branch, or tag) for the diff.
head_refNoHead git ref (commit, branch, or tag) for the diff.
project_rootNoAbsolute path to the project root directory on the local filesystem.
session_idNo
Behavior4/5

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

Despite no annotations, the description discloses key behaviors: read-only ('Read-only — no commits are created'), the effect of omitting refs ('omit both or pass empty strings to diff the working tree against HEAD'), and that CK validation is run. It lacks details on error cases or large diff handling but is largely transparent.

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?

The description is four well-structured sentences. The first sentence states the primary purpose and read-only nature. Subsequent sentences explain parameter behavior, return values, and usage guidance. No redundant or extraneous 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?

Given that there is no output schema, the description covers the return type ('diff text and any CK validation findings') but could be more specific about the structure. It also explains when to use the tool. Missing explicit handling of empty diffs or validation failures, but overall sufficiently complete for a git diff tool.

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 75% (3 of 4 parameters have descriptions). The description adds valuable context for base_ref and head_ref by explaining they are git refs and that omitting both diffs working tree vs HEAD. This goes beyond the schema. Session_id remains undocumented, slightly reducing completeness.

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 generates a git diff and runs CK validation. It reads 'Generate a git diff and run CK validation on the resulting diff' and explicitly distinguishes from siblings ck_git_status and ck_git_commit, making the purpose unmistakable.

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

Usage Guidelines5/5

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

The description provides explicit guidance: 'Use ck_git_diff to review changes before committing or submitting a review' and states when to use alternatives ('Use ck_git_status for a summary without the full diff' and 'Use ck_git_commit to create the commit after reviewing'). It also notes read-only nature.

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/aryaminus/controlkeel'

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