Skip to main content
Glama

Compare local text files

abox_text_diff

Compare two UTF-8 text files and write a unified diff or patch file, then verify the patch rebuilds the right file exactly. Returns counts and paths, not source lines.

Instructions

Compare two UTF-8 files and write a new unified .diff/.patch using the website bounded Myers engine. Verify that applying the patch to the left file exactly reconstructs the right, including line endings and final newlines. Ignore options affect comparison summaries only; the exported patch always describes the original files. Large rewrites can use coarse hunks. Returns counts and paths without source lines.

Input Schema

NameRequiredDescriptionDefault
left_pathYesAbsolute local filesystem path. URLs and network shares are refused.
right_pathYesAbsolute local filesystem path. URLs and network shares are refused.
ignore_caseNo
output_pathYesAbsolute local filesystem path. URLs and network shares are refused.
context_linesNo
ignore_whitespaceNo
ignore_blank_linesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare the write/idempotency profile; the description adds genuinely non-obvious behavior: it writes a NEW file at output_path, runs a round-trip verification that the patch exactly reconstructs the right file including line endings and final newlines, ignore options change summaries but never the exported patch, and large rewrites may produce coarse hunks. It also states what is returned (counts and paths, no source lines). This is well beyond what annotations provide.

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?

Four sentences, front-loaded with the core action, and each sentence carries distinct information (verification guarantee, ignore-option caveat, hunk granularity, return shape). Minor jargon ('website bounded Myers engine') costs a little clarity but is not 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 covers the return shape (counts and paths). It also covers the critical guarantee an agent needs before trusting the artifact. Missing only edge details: what happens if output_path exists, and what context_lines controls.

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 only 43%, and the description compensates for the biggest semantic gap: ignore_case/ignore_whitespace/ignore_blank_lines affect only the comparison summary, not the emitted patch. output_path is framed as the new .diff/.patch destination. context_lines is never explained, and overwrite/refusal behavior for an existing output_path is unstated.

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: compare two UTF-8 files and write a unified .diff/.patch to a new path. No sibling does text diffs, so it is unambiguously distinguishable from the format/inspect/conversion tools listed. The scope (local files, UTF-8) is stated up front.

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?

Usage context is implied rather than stated: 'Ignore options affect comparison summaries only' and 'Large rewrites can use coarse hunks' hint at when these knobs matter, but there is no explicit when-to-use/when-not or named alternative. An agent can infer the tool's role, but it is not guided on file-type preconditions or when to prefer another tool (e.g. abox_file_hash for identity checks).

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