Skip to main content
Glama

Embeddings, Rerank & Speech-to-Text (Tanod)

text_similarity

Read-onlyIdempotent

mlpeek: Score the semantic similarity of one or up to 50 text pairs. To rank documents against a query use rerank_documents. 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. The submitted text is never logged or stored. Docs: https://tanod.dev/learn/embeddings-rerank-ner-mcp-server.html

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 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

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. Changed13 schema fields changed
    • removedInput schema / $defs / SimPair / properties / a / title
      Removed value: -"A"
    • removedInput schema / $defs / SimPair / properties / b / title
      Removed value: -"B"
    • removedInput schema / $defs / SimPair / title
      Removed value: -"SimPair"
    • removedInput schema / properties / a / default
      Removed value: -null
    • removedInput schema / properties / a / title
      Removed value: -"A"
    • removedInput schema / properties / b / default
      Removed value: -null
    • removedInput schema / properties / b / title
      Removed value: -"B"
    • removedInput schema / properties / model / title
      Removed value: -"Model"
    • removedInput schema / properties / pairs / default
      Removed value: -null
    • removedInput schema / properties / pairs / title
      Removed value: -"Pairs"
    • removedInput schema / title
      Removed value: -"text_similarityArguments"
    • removedOutput schema / properties / model / properties
      Removed value: -{
      -  "alias": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "id": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "license": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "revision": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "source": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  }
      -}
    • removedOutput schema / properties / results / items
      Removed value: -{
      -  "properties": {
      -    "index": {
      -      "type": [
      -        "integer",
      -        "null"
      -      ]
      -    },
      -    "similarity": {
      -      "type": [
      -        "number",
      -        "null"
      -      ]
      -    },
      -    "tokens": {
      -      "items": {
      -        "type": [
      -          "integer",
      -          "null"
      -        ]
      -      },
      -      "type": [
      -        "array",
      -        "null"
      -      ]
      -    },
      -    "truncated": {
      -      "type": [
      -        "boolean",
      -        "null"
      -      ]
      -    }
      -  },
      -  "type": [
      -    "object",
      -    "null"
      -  ]
      -}
  2. 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"
      +}
  3. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. Beyond that the description is unusually rich: 512-token truncation with a `truncated` flag, 422 on oversized requests (uncharged), 503 on model unavailability, latency, per-pair pricing, and a 5-call/day free tier. The only knock is that the pricing/speed detail crowds out a clearer statement of what the `similarity` scalar means. This is strong added context, not a contradiction.

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 purpose and the sibling alternative before operational detail, which is the right order. It is dense with parentheticals and repeats the input shape ("one pair as a + b ... or 1-50 pairs" then "Input: a + b, or pairs"), costing a little economy.

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?

For a stateless scoring tool with an output schema, everything an agent needs is present: input shape, size caps, truncation behavior, error codes, cost, rate limit, and a docs link. Return-value explanation is correctly omitted because an output schema exists.

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 baseline is a 3, and the schema already documents a, b, pairs, and model with lengths and enum. The description does add real value by stating that `a`/`b` and `pairs` are mutually exclusive alternatives and that the model's 512-token window truncates input, but it never explains the scoring scale or the enum values small-en/multilingual in more depth than the schema. Solid but not compensating meaningfully beyond the schema.

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?

Opens with a specific verb and resource ("Score the semantic similarity of ... text pairs") and states the batch scope (one to 50 pairs). It immediately differentiates itself from rerank_documents, so an agent can pick correctly without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit routing rule: "To rank documents against a query use rerank_documents," which excludes the most confusable alternative by name. It also supplies the boundary conditions that change the call shape (1 pair vs. 1-50 pairs, 4,000-char and 16,384-token limits).

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.