Skip to main content
Glama

Lordevo Shop (x402 website checks)

Text diff: unified diff, hunks and similarity of two texts ($0.002/call)

text_diff
Read-onlyIdempotent

$0.002 per call (x402, USDC on Base; free trial: add "trial": true or use try_free). [Data utilities] Compares two texts you send and returns whether they are identical, a similarity score, counts of added, removed and unchanged lines (or words or characters), plus a unified diff and hunks in line mode or a change list in word and char mode. Input: before, after, optional mode, context, ignore_whitespace, ignore_case (POST for long text). Limits: 200,000 characters per side (word 100,000, char 20,000). Offline.

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": {
      "before": "<before>",
      "after": "<after>"
    },
    "name": "text_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoCompare by line (default, unified diff), word or characterline
afterYesThe new text, up to 200,000 characters (POST for long text)
trialNoOptional. true = free if a trial call is left (3 per IP per UTC day), else the payment terms.
beforeYesThe original text, up to 200,000 characters (POST JSON {"before": "...", "after": "..."} for long text)
contextNoUnchanged lines around each change in line mode, 0-20 (default 3)3
ignore_caseNoIgnore upper/lower caseno
ignore_whitespaceNoLine mode: ignore leading/trailing whitespaceno

Output Schema

NameRequiredDescriptionDefault
modeNo
toolNo
unitNo
cacheNo
hunksNo
statsNo
_trialNoPresent when the call was a free trial call.
changesNo
unifiedNo
providerNo
identicalNo
price_usdNo
similarityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / trial / description
      Previous value: -"Optional. true = answer free if a trial call is left (3 per IP per UTC day); otherwise you get the payment terms."New value: +"Optional. true = free if a trial call is left (3 per IP per UTC day), else the payment terms."
  2. Changed2 schema fields changed
    • addedInput schema / properties / trial
      Added value: +{
      +  "description": "Optional. true = answer free if a trial call is left (3 per IP per UTC day); otherwise you get the payment terms.",
      +  "type": "boolean"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "anyOf": [
      +    {
      +      "required": [
      +        "tool",
      +        "identical",
      +        "similarity",
      +        "stats"
      +      ]
      +    },
      +    {
      +      "properties": {
      +        "accepts": {
      +          "type": "array"
      +        },
      +        "error": {
      +          "type": "string"
      +        },
      +        "resource": {
      +          "type": "object"
      +        },
      +        "x402Version": {
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "x402Version",
      +        "accepts"
      +      ]
      +    },
      +    {
      +      "properties": {
      +        "charged": {
      +          "type": "boolean"
      +        },
      +        "error": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "error"
      +      ]
      +    }
      +  ],
      +  "properties": {
      +    "_trial": {
      +      "description": "Present when the call was a free trial call.",
      +      "type": "object"
      +    },
      +    "cache": {
      +      "type": "object"
      +    },
      +    "changes": {
      +      "items": {
      +        "properties": {
      +          "type": {
      +            "enum": [
      +              "added",
      +              "removed",
      +              "unchanged"
      +            ],
      +            "type": "string"
      +          },
      +          "value": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "hunks": {
      +      "items": {
      +        "properties": {
      +          "lines": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "new_lines": {
      +            "type": "integer"
      +          },
      +          "new_start": {
      +            "type": "integer"
      +          },
      +          "old_lines": {
      +            "type": "integer"
      +          },
      +          "old_start": {
      +            "type": "integer"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "identical": {
      +      "type": "boolean"
      +    },
      +    "mode": {
      +      "enum": [
      +        "line",
      +        "word",
      +        "char"
      +      ],
      +      "type": "string"
      +    },
      +    "price_usd": {
      +      "type": "number"
      +    },
      +    "provider": {
      +      "type": "string"
      +    },
      +    "similarity": {
      +      "maximum": 1,
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "stats": {
      +      "properties": {
      +        "added": {
      +          "type": "integer"
      +        },
      +        "removed": {
      +          "type": "integer"
      +        },
      +        "unchanged": {
      +          "type": "integer"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "tool": {
      +      "type": "string"
      +    },
      +    "unified": {
      +      "type": "string"
      +    },
      +    "unit": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds genuinely new behavioral facts: per-call pricing ($0.002 via x402/USDC on Base), a free-trial path, hard size limits per side and per mode, POST for long text, and "offline" execution.

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?

One dense but well-ordered paragraph: pricing, then purpose, then outputs, then inputs, then limits. Every clause carries information, though leading with the price tag rather than the purpose slightly delays the core signal.

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 an output schema present and full parameter coverage, the description need not explain return values, yet it does describe them anyway. Limits, pricing, trial and transport hints are all present; the only real omission is explicit differentiation from page_diff.

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 coverage is 100%, so baseline is 3. The description does add some meaning beyond the schema: it ties mode to output shape (unified diff/hunks in line mode, change list in word/char mode) and gives mode-specific limits (word 100,000, char 20,000) that the schema's uniform 200,000 maxLength does not convey. It says nothing about the string-typed context or yes/no enums beyond the schema.

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 ("compares two texts you send") and enumerates the exact outputs: identical flag, similarity score, added/removed/unchanged counts, unified diff and hunks or change list. The phrase "texts you send" implicitly separates it from URL-based siblings like page_diff, but no sibling is named explicitly.

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 context is implied by the input description (raw text in, diff out) and by the per-mode limits, but there is no explicit when-to-use/when-not guidance and no mention of page_diff as the alternative for comparing live pages. An agent must infer the routing decision.

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