Skip to main content
Glama

get_diff

Retrieve diff of code changes from git repos or directories. Shows unified diff for directories and git diff for repos, enabling review of modifications.

Instructions

Get diff output. For git repos returns git diff; for plain directories returns file contents in unified diff format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoPath to the directory or git repository (defaults to server working directory)
pathNoFilter diff to a specific file or directory
typeNoWhich changes to diff. Only used for git repos.
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds meaningful context by stating that git repos yield 'git diff' while plain directories return 'file contents in unified diff format'. However, it does not explicitly mention read-only nature, potential error conditions, or any dependencies (e.g., git being installed), leaving some gaps.

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 a compact two sentences with the primary action front-loaded. It efficiently conveys the tool's dual behavior without unnecessary details, earning every word.

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?

For a simple tool with well-documented parameters and no output schema, the description covers the key contextual nuance of git versus non-git behavior. It is adequate but could be more explicit about the output type (e.g., a text string), so it does not reach full completeness.

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?

The input schema provides 100% coverage for all three parameters with clear descriptions, including the 'type' enum's git-only usage. The description adds no additional parameter semantics beyond what the schema already specifies, so the baseline score of 3 is appropriate.

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's function: 'Get diff output' with a specific resource (diff). It further distinguishes behavior for git repos versus plain directories, differentiating it from sibling tools like review_changes and get_changed_files, which handle review and file listing respectively.

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 provides clear context about usage by explaining what happens in git repos versus plain directories, helping the agent decide when to use it. However, it does not explicitly name alternatives or state when not to use the tool, so it falls short of full usage guidance.

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/signal-slot/mcp-codexreview'

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