Skip to main content
Glama

ScorpTech x402 Tools

Text Diff

text_diff
Read-onlyIdempotent

Diff two texts: unified line diff byte-compatible with GNU diff -u (hunks, context, "No newline at end of file"), or word-level / character-level diff with [-removed-]{+added+} inline markup and merged ops. Myers shortest edit script with a patience fallback for very different inputs; options to ignore whitespace, case and CRLF/LF. Returns added/removed/unchanged counts and a similarity ratio. Offline; 20,000 lines or tokens per text. Returns JSON with: mode, identical, stats, similarity, unified, hunks, approximate. Price: $0.005 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/text-diff

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
aYesOriginal text (aliases: old, before)
bYesNew text (aliases: new, after)
modeNounified (default, alias line), word or char
a_labelNoLabel for the --- header (default a)
b_labelNoLabel for the +++ header (default b)
contextNoContext lines for unified mode, 0-20 (default 3)
ignore_eolNoTreat CRLF and LF as equal (default true)
ignore_caseNoCase-insensitive comparison
ignore_whitespaceNoTreat runs of whitespace as equal

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

Beyond the annotations (readOnly/idempotent/destructive=false), it discloses the algorithm and fallback ('Myers shortest edit script with a patience fallback'), hard input limits ('20,000 lines or tokens per text'), cost model ('$0.005 USDC per successful call'), the transport and an alternate HTTPS endpoint, and the exact response keys. That is substantial behavior an agent could not get from structured fields.

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?

Front-loaded with the core action and modes, then algorithm, limits, return keys, and finally price/endpoint. Dense but each sentence carries information. The pricing and HTTP endpoint sentences sit awkwardly mid-paragraph rather than in a clearly separated section.

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 no output schema, the description compensates by enumerating the JSON return fields (mode, identical, stats, similarity, unified, hunks, approximate) and stating size limits and billing. For a read-only diff utility with 9 fully documented parameters, nothing material is missing.

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 the schema already documents every parameter and its default. The description reinforces mode and ignore behavior (whitespace, case, CRLF/LF) but adds no syntax or format detail the schema lacks, so the baseline of 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?

The description names a specific verb and resource ('Diff two texts') and spells out the exact output semantics (unified GNU-compatible hunks, word/char inline markup). An agent can distinguish it from json_diff and mode_diff by subject matter. It stops short of 5 because no sibling is named for routing, so the discrimination depends on inference from the resource name.

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?

It states the default mode and lists the alternative modes plus ignore options, which implies usage but never explicitly says when to pick this over text_similarity or json_diff. There are no when-not-to-use conditions and no prerequisites stated for what constitutes a compatible input pair.

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