Skip to main content
Glama

Text Diff

text_diff
Read-only

Differences between two texts: mode lines, words or chars; the added, removed and unchanged parts with counts, a similarity ratio (2 x unchanged / both texts' units), and a unified diff for lines. Body { a, b, mode }: lines and words up to 50 KB each, chars up to 20 KB each (capped for the Worker's CPU budget). Pure code using the diff package (BSD-3-Clause). Price: $0.002 in USDC per successful call, paid with x402 (Base, Solana or Arc); failed calls are not charged.

Input Schema

NameRequiredDescriptionDefault
aYesThe first text (JSON body field)
bYesThe second text (JSON body field)
modeNolines (default), words or chars

Output Schema

NameRequiredDescriptionDefault
modeNo
partsNo
countsNo
sourceNo
checkedAtNo
identicalNo
similarityNo
unifiedDiffNo
partsTruncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context beyond the readOnly/openWorld annotations: exact cost ($0.002 USDC per successful call), payment rails (x402, Base/Solana/Arc), and the crucial billing rule that failed calls are free. It also discloses the per-mode payload caps and their reason (Worker CPU budget), which is exactly the kind of operational constraint an agent needs before sending a large body.

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?

Front-loaded with the purpose, then details; every sentence carries information (modes, outputs, ratio formula, limits, cost). It is dense and semicolon-chained rather than cleanly structured, which costs one point but there is little waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Explains the return contents (added/removed/unchanged parts with counts, similarity ratio with its formula, unified diff for lines) even though an output schema exists, and covers limits, pricing and failure charging. Nothing an agent needs to call this correctly is missing.

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 earns above that by attaching concrete size ceilings to each mode (50 KB for lines/words, 20 KB for chars) and restating the body shape, which the schema alone does not convey.

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+resource ('differences between two texts') and immediately enumerates the granularity modes and the outputs produced. No sibling tool in the list does text comparison, so the agent can select it unambiguously.

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 actionable selection guidance for the mode parameter by pairing each mode with its size limit, so the agent knows which mode fits a given input size. It stops short of naming when not to use it (e.g., vs text_chunk or validate) or any alternative, so no exclusions are stated.

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.

Resources