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: 5 calls/day per IP. Paid: Radar API key (from €15/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.001/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

A3.5/5.0
Behavior3/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 useful behavior beyond them: server-side execution, immediate file deletion with nothing stored, authentication mechanics, and a concrete rate limit. However, it omits whether large texts are truncated, any size limits, or how changed lines are reported (positional pairing), so a 3 rather than higher.

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 is front-loaded in the first sentence and the remaining sentences cover persistence, limits and payment options without a wasted clause. The pricing URL and cost detail are dense but serve the call decision, though they read slightly like marketing copy.

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 must at least sketch the return value, and 'added, removed and changed lines with counts' does so adequately. Authentication and rate limits are fully covered; missing are edge-case behavior (empty inputs, very large texts) and any statement of error conditions.

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% and all four parameters (textA, textB, ignoreCase, ignoreTrailingSpaces) are documented in the schema itself, including defaults. The description adds no format hints, such as line-ending or size constraints, beyond what the schema already provides, so the baseline 3 applies.

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?

States a specific verb and resource ('Compare two texts') plus the result shape ('added, removed and changed lines with counts'), so the agent knows exactly what it produces. It does not name or contrast any sibling such as remove_line_breaks, which is the only thing separating a 4 from 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 Guidelines3/5

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

The description supplies operational guidance (free tier of 5 calls/day per IP, paid via X-API-Key or x402) but never says when to choose this tool over related ones or what kinds of text it is appropriate for. Usage is implied by the purpose statement rather than explicitly scoped.

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