Skip to main content
Glama

Text diff

text_diff
Read-onlyIdempotent

Diff two texts: unified diff (patch format), a line/word-level change list, and similarity % — compare versions of a doc, config or code. jsdiff. mode=lines gives a unified patch; mode=words gives word-level changes for prose. Price: free.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYes
bYes
modeNolines
contextNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive behavior. The description adds useful behavioral detail beyond that: it names the underlying library (jsdiff) and explains what each mode produces. It stops short of describing the exact return shape, but for a pure read-only compute tool this is adequate.

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?

The description is compact and front-loaded: the core purpose and output types appear in the first sentence, followed by mode behavior and a cost note. Every sentence contributes useful information, with no fluff or repetition.

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

Completeness3/5

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

The description covers the tool's main purpose and mode selection, but with no output schema it leaves some gaps: the meaning of context is not explained, and the exact shape of the returned change list or similarity percentage is not specified. For a moderate-complexity tool, this is adequate but not fully complete.

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 0%, so the description must compensate. It clarifies that a and b are the two texts and explains mode semantics well, but it says nothing about the context parameter, which controls the number of context lines in the patch. That leaves one of four parameters semantically unexplained.

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?

The description states a specific verb and resource ('Diff two texts') and enumerates distinct outputs: unified diff/patch, line/word-level change list, and similarity percentage. It also gives concrete use cases (doc, config, or code), which separates it from siblings like text_stats or markdown_convert.

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?

The description gives clear context for when to use the tool ('compare versions of a doc, config or code') and explains mode selection: mode=lines for a unified patch, mode=words for prose. It does not explicitly exclude alternatives, but no sibling tool provides diffing, so the guidance is sufficient.

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