Skip to main content
Glama

IA-QA — 152 QA & Dev Tools for AI Agents

diff_text

Read-onlyIdempotent

Compute a unified line-by-line diff between two text strings (LCS algorithm). Returns added/removed/unchanged line counts and formatted diff hunks with configurable context lines (0–20). Use to compare versions of prompts, configs, code snippets, or any text where you need to see exactly what changed.

Input Schema

NameRequiredDescriptionDefault
aYesOriginal (before) text
bYesModified (after) text
contextNoContext lines around each change (0–20, default: 3)

Output Schema

NameRequiredDescriptionDefault
diffNo
addedNo
removedNo
unchangedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "a": "a\nb\nc",
      +    "b": "a\nB\nc"
      +  }
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / context / description
      Previous value: -"Context lines around each change (0–20, default: 3)"New value: +"Context lines around each change (0–20, default: 3)"
  3. Changed1 schema field changed
    • addedOutput schema / properties
      Added value: +{
      +  "added": {
      +    "type": "number"
      +  },
      +  "diff": {
      +    "type": "string"
      +  },
      +  "removed": {
      +    "type": "number"
      +  },
      +  "unchanged": {
      +    "type": "number"
      +  }
      +}
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  5. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior, so the bar is lower. The description adds meaningful context beyond annotations: the LCS algorithm, line-count output, formatted hunks, and configurable context lines, though it does not mention limitations such as line-oriented rather than word-oriented comparison.

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 tightly written sentences with no filler. It front-loads the core operation and follows immediately with practical use cases.

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?

Given complete schema coverage, an output schema, and clear safety annotations, the description supplies everything needed to select and invoke the tool correctly. The algorithm and return-summary details are useful additions rather than requirements.

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 100%, so the schema already documents a as original text, b as modified text, and context as 0–20 with default 3. The description reinforces the context-line range but adds no syntax or edge-case guidance beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: 'Compute a unified line-by-line diff between two text strings' and even names the LCS algorithm. It clearly implies a text-diff use case distinct from structured tools like json_diff, but it does not explicitly name or distinguish itself from that sibling.

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?

It gives clear usage scenarios — comparing prompt versions, configs, code snippets, or any text where exact changes matter. It does not state when not to use it or name an alternative such as json_diff, so it stops short of full routing guidance.

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.