Skip to main content
Glama

Diff between versions

history_diff
Read-only

Compare a single Overleaf file between two saved versions to review what a collaborator changed; read-only and binary files return no text diff.

Instructions

Unified diff of one file between two history versions (from the history tool's vFrom→vTo numbers), e.g. to review what a collaborator changed. Read-only; binary files have no text diff.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "fromVersion": "<fromVersion>",
      "toVersion": "<toVersion>"
    },
    "name": "history_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath of the file inside the project, e.g. "main.tex"
projectNoProject name, id or Overleaf URL. May be omitted when exactly one project is pinned.
toVersionYesNewer version number, from history
fromVersionYesOlder version number, from history

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.1.4
    • addedInput schema / properties / fromVersion / description
      Added value: +"Older version number, from history"
    • addedInput schema / properties / path / description
      Added value: +"Path of the file inside the project, e.g. \"main.tex\""
    • addedInput schema / properties / toVersion / description
      Added value: +"Newer version number, from history"
  2. First observedv2.1.1

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, and the description reinforces that while adding a genuine behavioral caveat: binary files yield no text diff. Beyond that it says nothing about size limits, truncation of large diffs, or error behavior when a version is missing, so the added value is real but thin.

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?

A single tight sentence with the core operation front-loaded, then the usage example, then the read-only and binary caveats. Every clause carries information; nothing is padding.

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 read-only diff with no output schema, the definition covers what it returns (unified diff), how to obtain inputs, and the binary edge case. It omits practical limits such as maximum diff size or behavior on identical versions, which would matter for an open-world 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 parameters are already documented, including that fromVersion is the older and toVersion the newer number. The description adds only the provenance hint ('from the history tool's vFrom→vTo numbers'), which duplicates what the schema already says about sourcing them from history.

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 — 'Unified diff of one file between two history versions' — and immediately disambiguates from the sibling 'history' tool by naming where the version numbers come from. An agent can distinguish this from history, read_file, and grep without opening any schema.

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?

Gives a concrete use case ('to review what a collaborator changed') and a prerequisite dependency (version numbers obtained from the history tool). It does not state when-not to use it, e.g. comparing two files or diffing the working copy, so it stops short of full routing guidance.

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