Skip to main content
Glama

Tanod ML

mlpeek: semantic similarity of text pairs

text_similarity
Read-onlyIdempotent

mlpeek: Score the semantic similarity of one or up to 50 text pairs. Returns the cosine similarity of the embeddings of each text pair (bge-small-en or multilingual-e5-small): one pair as a + b (also a top-level similarity) or 1-50 pairs. Input: a + b, or pairs; each text at most 4,000 characters; optional model. Each text is cut at the model's 512-token window (truncated says so); over 16,384 tokens per request is a 422 (not charged): split it. Runs an open model pinned by hash on Tanod's own CPU (no LLM, no third-party API); an unavailable model is a 503 (not charged). Typically 20-50 ms for one pair, under 1 s for 50 short pairs. Price: USD 0.0005 per pair, at least USD 0.001 per call (1-50 pairs per call: USD 0.001-0.025). Free: 5 mlpeek calls per IP per UTC day. Tanod does not log or store the submitted text; it is processed in memory for this answer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aNoFirst text of a single pair (at most 4,000 characters).
bNoSecond text of a single pair.
modelNosmall-en (English) or multilingual.small-en
pairsNoAlternative to a / b: 1-50 {a, b} pairs. Priced per pair, minimum USD 0.001 per call.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
modelNo
usageNo
metricNo
resultsNo
similarityNo
max_tokens_per_textNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "error": {
      +      "description": "Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object."
      +    },
      +    "max_tokens_per_text": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "metric": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "model": {
      +      "properties": {
      +        "alias": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "id": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "license": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "revision": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "source": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "results": {
      +      "items": {
      +        "properties": {
      +          "index": {
      +            "type": [
      +              "integer",
      +              "null"
      +            ]
      +          },
      +          "similarity": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "tokens": {
      +            "items": {
      +              "type": [
      +                "integer",
      +                "null"
      +              ]
      +            },
      +            "type": [
      +              "array",
      +              "null"
      +            ]
      +          },
      +          "truncated": {
      +            "type": [
      +              "boolean",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": [
      +          "object",
      +          "null"
      +        ]
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "similarity": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "usage": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources