Skip to main content
Glama

git_diff

Read-only

Show unified diffs for a place's mirror repo to compare uncommitted changes, a commit against working files, or two commits, optionally limited to one file.

Instructions

Show a unified diff in a place's mirror repo. Read-only. With no refs it shows uncommitted changes; with from it compares that commit to the working files; with from and to it compares two commits. For a commit's summary use git_show; for which files changed use git_status.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "git_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEnding commit or ref, e.g. "HEAD". Only used together with from.
fromNoStarting commit or ref, e.g. "HEAD~1" or a hash. Omit to diff uncommitted changes against HEAD.
pathNoLimit the diff to one file. File path relative to the mirror folder, as git_status or git_log prints it, e.g. "ServerScriptService/Main.server.luau".
placeNoTarget place (PlaceId or project name) whose mirror repo to use. Defaults to the bound/sole connected place.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.1
    • addedInput schema / properties / from / description
      Added value: +"Starting commit or ref, e.g. \"HEAD~1\" or a hash. Omit to diff uncommitted changes against HEAD."
    • addedInput schema / properties / path / description
      Added value: +"Limit the diff to one file. File path relative to the mirror folder, as git_status or git_log prints it, e.g. \"ServerScriptService/Main.server.luau\"."
    • changedInput schema / properties / place / description
      Previous value: -"Target place (PlaceId or project name); defaults to the bound/sole place"New value: +"Target place (PlaceId or project name) whose mirror repo to use. Defaults to the bound/sole connected place."
    • addedInput schema / properties / to / description
      Added value: +"Ending commit or ref, e.g. \"HEAD\". Only used together with from."
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so "Read-only" in the description is redundant rather than additive. What it does add beyond annotations is the mode matrix describing what each ref combination diffs, but it says nothing about output size, truncation, or behavior for large diffs. For a read-only diff tool that is an acceptable but not rich disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core action and the mode rules, then ends with routing to siblings — good ordering. The lone wasted element is the flat "Read-only" sentence, which only restates the annotation.

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?

Four optional parameters, no output schema, and thin annotations: the description covers the important ambiguity (what the optional refs do) and the routing decision. It is not fully complete on return-value expectations for large diffs, but no output schema exists to carry that burden, so this is a mild gap rather than a blocking one.

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 100%, so the baseline is 3; the description earns above that by explaining the interaction between the optional from and to parameters in terms of resulting diff semantics, which the schema only hints at. It still says nothing about "path" or "place" beyond what the schema documents.

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?

States a specific verb and resource ("Show a unified diff in a place's mirror repo") and immediately distinguishes itself from git_show (commit summary) and git_status (which files changed). An agent can pick it over its siblings without opening a schema.

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?

Gives explicit branch conditions: no refs for uncommitted changes, from alone to compare a commit against working files, from+to to compare two commits. It also names the two sibling alternatives and what each is for, so the when-not-to-use case is covered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.