Skip to main content
Glama

text_diff

Generate a unified diff between two text strings. Ideal for comparing file versions before and after edits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contextNoContext lines around each change (default 3)
modifiedYesModified text
originalYesOriginal text
modified_fileNoLabel for the modified file (default "modified")
original_fileNoLabel for the original file (default "original")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the core behavior (generating a unified diff) but doesn't mention potential limitations such as handling of large inputs or exact output formatting. The operation is a pure function, so no side effects are expected, but this is not explicitly stated.

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 two sentences, with the primary action front-loaded: 'Generate a unified diff between two text strings.' The second sentence adds useful usage context without redundancy or wasted words.

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?

The description gives the essential purpose and a use case. It doesn't explicitly state the return type, but that's implied by 'generate a unified diff.' Given the simple nature of the tool and full schema coverage, the description is adequate, though not exhaustive.

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?

The schema covers all 5 parameters with descriptions, so the description adds no additional parameter semantics. The mention of 'unified diff' aligns with the context parameter (context lines) but doesn't elaborate beyond the schema, so baseline 3 is appropriate.

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 clearly states the tool's action and resource: 'Generate a unified diff between two text strings.' It also distinguishes itself from sibling json_diff by explicitly focusing on text strings rather than JSON.

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 provides a concrete use case: 'Ideal for comparing file versions before and after edits.' It does not explicitly exclude alternatives like json_diff or diff_stats, but it gives clear context for when text_diff is appropriate.

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.