Skip to main content
Glama

ScorpTech x402 Tools

Text Similarity

text_similarity
Read-onlyIdempotent

Document similarity and near-duplicate detection: compare two texts (a, b) or cluster up to 200 texts. Metrics: TF-IDF cosine on stemmed content words, word Jaccard, k-word shingle Jaccard and containment, 64-bit SimHash with Hamming distance, and character edit ratio for short texts, plus a verdict (identical / near-duplicate / similar / related / different). Batch mode returns the most similar pairs and duplicate clusters. Offline, deterministic. Returns JSON with: cosine, jaccard, shingleJaccard, containment, simhashDistance, editRatio, verdict, words. Price: $0.002 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/text-similarity

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "text_similarity"
  }
}

Input Schema

NameRequiredDescriptionDefault
aNoFirst text
bNoSecond text
textsNoBatch mode: texts to compare pairwise and cluster
minScoreNoBatch: only report pairs with cosine >= this
thresholdNoShingle Jaccard needed to call two texts duplicates (batch clusters)
shingleSizeNoWords per shingle

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Beyond what the annotations state, the description adds genuine operational context: offline and deterministic execution, the 200-text batch ceiling, the verdict taxonomy, the price ($0.002 USDC per successful call via x402 on Base or Solana) and an equivalent HTTPS endpoint. It does not cover latency, rate limits, or what happens when both a/b and texts are supplied, which keeps it below a 5.

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?

The definition is front-loaded with the purpose and modes, then metrics, then return fields, then price and endpoint—a sensible order with no filler. The metrics sentence is long and dense, but each clause carries information an agent needs to interpret the output.

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 usefully enumerates the returned JSON fields (cosine, jaccard, shingleJaccard, containment, simhashDistance, editRatio, verdict, words), which is exactly what an agent needs. The one gap is that no parameter is required and it does not state the precedence or error behavior when a caller provides both a/b and texts.

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 the six parameters are already documented, and this is the baseline case where the schema does the heavy lifting. The description adds mode-level meaning (a and b are the pairwise inputs, texts is the batch input, shingle size drives the k-word shingle metrics), but it never clarifies how minScore versus threshold interact or which mode the thresholds apply to.

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?

The first sentence names a specific verb and resource (compare two texts / cluster up to 200 texts for near-duplicate detection) and enumerates the exact metrics computed. An agent can distinguish it from text_diff or hamming because it explicitly states which similarity measures are returned and that a verdict category is produced.

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 clearly describes the two operating modes ('compare two texts (a, b)' versus 'cluster up to 200 texts') and what batch mode returns, which gives concrete context for selecting a mode. It stops short of excluding alternatives or telling the agent when to prefer a sibling such as hamming or text_diff, so there is no explicit when-not 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