Skip to main content
Glama

ck_git_diff

Read-onlyIdempotent

Generate a git diff and run CK validation on it to surface findings before committing or submitting a 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.
session_idNo
project_rootNoAbsolute path to the project root directory on the local filesystem.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
diffNo
base_refNo
head_refNo
validationNo
files_changedNo
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false. The description reinforces read-only behavior and adds that it returns diff text and CK validation findings, which provides context beyond annotations.

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 concise with three main sentences plus a usage triplet. It front-loads the core purpose and read-only nature, with no wasted words.

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 an output schema exists and annotations cover safety, the description covers core usage, parameter behavior, and distinguishes alternatives. The only gap is the session_id parameter, but overall it is complete enough for correct tool invocation.

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 coverage is 75%, and the description adds meaning for base_ref and head_ref by explaining they are git refs and can be omitted. However, the session_id parameter lacks explanation in both schema and description, so the description only partially compensates for the coverage gap.

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 explicitly says 'Read-only — no commits are created' and distinguishes from siblings like ck_git_status and ck_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 Guidelines5/5

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

The description provides explicit when-to-use guidance: 'Use ck_git_diff to review changes before committing or submitting a review.' It also gives clear alternatives: 'Use ck_git_status for a summary without the full diff. Use ck_git_commit to create the commit after reviewing.' Additionally, it explains parameter usage for base_ref and head_ref.

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