Skip to main content
Glama

Text Diff API - line-by-line differences between two texts

text_diff
Read-onlyIdempotent

Compare two texts and get added, removed and changed lines with counts. Runs on our server, files are deleted right after the call, nothing stored. Free: 25 calls/day per IP. Paid: $0.001 per call via x402 at https://radarbg.com/x402/text-diff.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "textA": "a\nb\nc",
      "textB": "a\nB\nc\nd"
    },
    "name": "text_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
textAYesOriginal text
textBYesChanged text
ignoreCaseNoIgnore capital letters
ignoreTrailingSpacesNoIgnore spaces at line ends

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and openWorld, so the safety profile is covered. The description adds genuinely new behavior: server-side execution, immediate file deletion, no storage, a 25 calls/day free tier and $0.001/call paid path via x402 — all decision-relevant for an agent. It stops short of describing response format or error behavior.

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?

Three short sentences, front-loaded with the core capability, then privacy, then cost. Every sentence carries information an agent would act on; nothing is redundant.

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?

With no output schema, the description does state what comes back (added/removed/changed lines with counts), and it covers privacy and rate limits. It could be more explicit about the response structure, but for a two-input utility tool this is close to 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 100%, so textA, textB, ignoreCase and ignoreTrailingSpaces are already documented with defaults. The description adds no extra meaning about parameter interaction or formatting (e.g., newline handling), so baseline 3 applies.

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 and resource ('Compare two texts') plus the exact result shape ('added, removed and changed lines with counts'). No sibling tool does diffing, so the agent can identify it unambiguously from the name and first sentence.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the verb (use it to diff two texts), but there is no explicit when-to-use/when-not guidance and no named alternative. The pricing and quota lines give operational context rather than selection 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.

Resources