text_similarity
Semantic similarity of two texts for RAG, dedupe and matching: JSON body {a, b}, each up to 8,000 chars, any language. Returns a cosine score from bge-m3 embeddings plus a rough band (near_duplicate, high, related, weak, unrelated). Texts are not stored. Price $0.003 USDC per call via x402. Example output: {"similarity":0.8123,"band":"high","metric":"cosine","model":"baai/bge-m3","dimensions":1024,"chars":{"a":23,"b":27}}
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_similarity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | First text, max 8,000 characters | |
| b | Yes | Second text, max 8,000 characters |