Skip to main content
Glama

Diff two committed versions

vc_diff
Read-only

Compare two committed versions of a record or the entire repo to see what changed before deciding to revert. Defaults to showing the last change, and accepts specific hashes for any pair.

Instructions

Unified diff between two committed versions — of one record (resource + id) or the whole repo. Defaults answer "what did the last change change?": ref_b = HEAD, ref_a = the previous commit touching the record (or HEAD's parent repo-wide). Pass hashes from vc_log for any pair. Inspect the diff BEFORE restore_resource so a revert is never blind. Requires PORTAL_VC_DIR.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoRecord id (requires resource).
ref_aNoOlder ref/hash (default: the commit before ref_b for this record).
ref_bNoNewer ref/hash (default HEAD).
resourceNoRecord kind to scope to, e.g. 'block' or 'layout' (with id).
max_charsNoCap the diff text (default 40000 chars; the file list is always complete).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
diffYes
noteNo
ref_aYes
ref_bYes
truncatedYes
files_changedYes
Behavior4/5

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

Annotations already mark readOnlyHint=true, so the description adds value beyond that by explaining the default ref behavior (ref_b=HEAD, ref_a=previous commit) and the requirement for PORTAL_VC_DIR. It also notes that the file list is always complete even when max_chars caps the diff text. No contradictions 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?

The description is three sentences, front-loaded with the core purpose, then defaults, then a usage warning and environment requirement. Every sentence earns its place with no 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?

Given the output schema exists and annotations are present, the description covers the key behavioral aspects: two scoping modes, default refs, the pre-restore use case, and the PORTAL_VC_DIR dependency. It doesn't enumerate potential errors or return structure, but the output schema handles that, and the description is otherwise complete.

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 adds meaning by explaining how ref_a/ref_b defaults are calculated, that passing hashes from vc_log enables arbitrary pairs, and that max_chars caps diff text while the file list remains complete. This enriches the parameter understanding beyond the schema.

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 produces a unified diff between two committed versions, and distinguishes between scoping to a single record or the whole repo. It is differentiated from sibling tools like vc_status (status) and vc_log (log) by focusing on diffing commits.

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 gives clear context for when to use this tool, specifically advising to inspect the diff BEFORE restore_resource. It also mentions passing hashes from vc_log, implying vc_log is the source for refs. It lacks explicit exclusions or a named alternative for 'when not to use', but the usage guidance is solid.

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/zuarbase/Zuar-Portal-MCP-Public'

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