Skip to main content
Glama

capture_diff

Render a git diff with color-coded additions and deletions for PR reviews, migration guides, and change documentation. Parses unified diff format showing file headers, line numbers, and context lines.

Instructions

Render a git diff with color-coded additions (green) and deletions (red). Parses unified diff format (output of git diff, diff -u). Shows file headers, line numbers, and context lines. Ideal for PR reviews, migration guides, and change documentation. Maximum input 500KB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
diffYesDiff content in unified diff format (e.g., output of 'git diff' or 'diff -u'). Must include file headers (---/+++) and hunks (@@ -... +... @@). Maximum 500KB.
outputNoOutput filename (default: auto-generated as 'diff-<timestamp>.png' or '.jpeg' based on SNAPMCP_FORMAT). Include extension to override format.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.3.4
    • changedInput schema / properties / diff / description
      Previous value: -"Diff content (git diff / unified diff format)"New value: +"Diff content in unified diff format (e.g., output of 'git diff' or 'diff -u'). Must include file headers (---/+++) and hunks (@@ -... +... @@). Maximum 500KB."
    • addedInput schema / properties / diff / maxLength
      Added value: +500000
    • changedInput schema / properties / output / description
      Previous value: -"Output filename (default: auto-generated)"New value: +"Output filename (default: auto-generated as 'diff-<timestamp>.png' or '.jpeg' based on SNAPMCP_FORMAT). Include extension to override format."
  2. First observedv2.3.2

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses parsing behavior, displayed elements, and a 500KB size limit, which is useful. But it does not state whether the tool writes an image file, what the output artifact is, or any side effects — details only partially covered by the schema's output parameter.

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 compact and front-loaded with the primary action: 'Render a git diff with color-coded additions and deletions.' Each sentence adds relevant context — parsing, display elements, use cases, and size limit — without redundancy.

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 tool with two parameters and no annotations, the description covers input format, size limit, rendering features, and ideal use cases. It omits explicit output format or mechanics, but the schema's output parameter fills that gap. This is adequate for a straightforward capture tool.

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 description coverage is 100%, so the baseline is 3. The description reinforces the diff format requirement and size cap, but these are already present in the schema's diff parameter. The output parameter is adequately described in the schema, so the description adds minimal parameter-level value.

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 opens with a specific verb and resource — 'Render a git diff with color-coded additions and deletions' — and distinguishes itself from sibling capture_* tools by specifying unified diff input and rendering features. It clearly identifies the tool's unique function within the capture family.

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 states 'Ideal for PR reviews, migration guides, and change documentation,' which signals appropriate contexts. It also defines the accepted input format (unified diff), implying it should be used only when data is in that format. However, it does not explicitly name alternative sibling tools or state when not to use it.

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