Skip to main content
Glama

Agent Data Tools: Utilities

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 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "a": "<a>",
      "b": "<b>"
    },
    "name": "text_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYesThe original text
bYesThe new text

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, yet the description still adds real value beyond them: it states the tool 'reads or computes only and changes nothing,' gives the output format with per-line markers and counts, and discloses the cost model (first 10 free, $0.01/call, failed calls free). The note that 'each call is charged, so repeats are not free' explains why idempotentHint is false, which the annotation alone leaves opaque.

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 and output format are front-loaded, and the pricing sentence is compact. The inline example with literal newlines is somewhat awkward to parse, but every sentence (purpose, usage, example, cost, safety) carries information an agent needs.

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?

With only two fully documented required parameters, no output schema and simple string inputs, the description covers everything needed: what it computes, how results are presented, that it mutates nothing, and what it costs. Nothing required to call it 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%, with 'a' described as the original text and 'b' as the new text, so the baseline is 3. The worked example (a=one/two/three, b=one/2/three/four) adds genuine meaning by showing that inputs are multi-line strings compared line by line, which the schema does not convey.

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 opens with a specific verb and resource ('Line-by-line difference between two texts') and even specifies the output shape: each line marked unchanged, removed or added, with counts. That is enough to distinguish it from siblings like date_diff or text_stats, though it never names an alternative explicitly, which keeps it short of a 5.

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 states clear usage context: 'Use to see what changed between two versions of a document, config or prompt.' That tells an agent the scenario without any when-not conditions or named alternatives, which matches the 4 bar of clear context but no exclusions.

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