Skip to main content
Glama

ck_git_diff

Read-onlyIdempotent

Generate a git diff and run CK validation to review changes before committing.

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_refNo
diffNo
files_changedNo
head_refNo
validationNo
Behavior4/5

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

Annotations already provide readOnlyHint, destructiveHint, idempotentHint. Description adds that it is read-only with no commits created and describes return value (diff text and CK findings). Consistent with 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?

Concise, front-loaded with core action, then provides usage guidelines and parameter hints. Every sentence adds value.

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 annotations, output schema presence, and sibling list, description covers purpose, parameter usage, return type, and when to use. No 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 75%. Description adds meaning for base_ref and head_ref, explaining they can be omitted or empty to diff against HEAD. Provides context beyond schema descriptions (e.g., 'git refs (branch names, commit SHAs, or tags)').

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?

Description states 'Generate a git diff and run CK validation on the resulting diff' with clear verb-resource combination. Distinguishes from siblings by specifying use cases for ck_git_diff, 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?

Explicitly states when to use: 'to review changes before committing or submitting a review.' Provides alternatives: 'ck_git_status for a summary without the full diff' and 'ck_git_commit to create the commit after reviewing.'

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