Skip to main content
Glama

uvcs_revision_diff

Read-onlyIdempotent

Compare one text file across two revisions, a revision and the workspace copy, or a changeset and its parent. Returns a read-only unified line diff, truncated after 200,000 characters.

Instructions

Return a unified line diff of one text file between two revisions, or between a revision and the workspace copy. Pass changeset to see what that changeset changed in the file. Output longer than 200000 characters is truncated. Read-only.

Input Schema

NameRequiredDescriptionDefault
toNoNewer side: cs:130, lb:LABEL, or a branch. Omit to compare with the file in the workspace.
fromNoOlder side: cs:123, lb:LABEL, or a branch such as /main (latest revision on it).
contextNoUnchanged lines around each change, from 0 to 20. Default: 3.
filePathYesPath relative to UVCS_WORKSPACE, for example Assets/Scripts/Player.cs.
changesetNoChangeset spec such as cs:123. Compares the file in that changeset with its parent changeset. Do not combine with from/to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover read-only/idempotent/non-destructive, so repeating "Read-only" earns no credit. The genuinely valuable addition is the truncation rule (output > 200000 chars is truncated) and the statement that the result is a unified line diff, which tells the agent what to expect from the return payload.

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?

Three short sentences, front-loaded with the core verb and resource, then the mode variant, then the one non-obvious operational constraint (truncation). No filler.

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?

With no output schema, the description adequately covers the return shape (unified line diff) and its size limit. The remaining gap is disambiguation from the three similarly named diff siblings, which matters for correct tool selection in this crowded namespace.

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 baseline is 3. The description's parameter-related statements (omit `to` to compare against the workspace, use `changeset` to see a changeset's change) restate what the schema already documents verbatim, adding no syntax or semantics beyond it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Return a unified line diff of one text file") and enumerates both comparison modes (revision-to-revision, revision-to-workspace). It does not distinguish itself from the near-identically named siblings uvcs_diff_file and uvcs_changeset_diff, leaving the agent to guess which diff tool to pick.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Omit to compare with the file in the workspace" and "Pass changeset to see what that changeset changed" give mode-level guidance. However, there is no explicit when-not and no routing to the obviously overlapping siblings (uvcs_diff_file, uvcs_changeset_diff), so the agent must infer which of the three to call.

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