Skip to main content
Glama

Text diff, compare two texts: compare two texts line by line and show what was added and removed

text_diff
Read-only

Line-by-line difference between two texts: each line marked as unchanged, removed or added, with counts. Use to see what changed between two versions of a document, config or prompt. Example: a=one two three, b=one 2 three four. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
aYesThe original text
bYesThe new text

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds real context beyond that: pricing ($0.01/call via x402 USDC or card key, first 25 free, failed calls free) and the warning that repeated calls are charged. That billing note also explains the otherwise puzzling idempotentHint=false for a pure computation, so the description and annotations are consistent.

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?

Purpose is front-loaded in the first clause, followed by usage, an example, and pricing. The multi-line example inflates the text slightly, but every segment carries distinct information; nothing is redundant 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 still conveys the return format (per-line markers plus counts) and the cost/safety profile. Only minor gaps remain, such as output ordering or handling of empty/trailing newline cases.

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 'a' = original and 'b' = new are already documented. The worked example (a with newlines, b with a changed and added line) adds meaning the schema does not: that inputs are newline-delimited text compared line by line.

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?

Names a specific verb and resource ('line-by-line difference between two texts') and states the output shape (each line marked unchanged/removed/added, with counts). This clearly separates it from neighbors like text_stats, text_extract, or regex_test, which don't compare two inputs.

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 concrete when-to-use framing: 'Use to see what changed between two versions of a document, config or prompt.' No explicit exclusions or named alternatives, but the intended scenario is unambiguous.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.