Skip to main content
Glama

Tanod ML

mlpeek: rerank documents against a query

rerank_documents
Read-onlyIdempotent

mlpeek: Rerank up to 100 documents against a query. Returns 1-100 documents scored against a query by the ms-marco-MiniLM-L6-v2 cross-encoder (Apache-2.0) and sorted best first: index, rank, score (sigmoid of the logit, a relevance in 0-1) and logit; top_k keeps the best k. English model. Input: query, documents, optional top_k. Each text is cut at the model's 512-token window and the answer says so (longest side first). Over 32,768 tokens per request is a 422 too_many_tokens (not charged). 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 0.1-2 s, up to about 10 s at the token budget. Price: USD 0.002. 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
queryYesThe query (at most 2,000 characters).
top_kNoKeep the best k (default: all, ranked).
documentsYes1-100 documents, each at most 4,000 characters.

Output Schema

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

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_pair": {
      +      "type": [
      +        "integer",
      +        "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"
      +      ]
      +    },
      +    "note": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "results": {
      +      "items": {
      +        "properties": {
      +          "index": {
      +            "type": [
      +              "integer",
      +              "null"
      +            ]
      +          },
      +          "logit": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "rank": {
      +            "type": [
      +              "integer",
      +              "null"
      +            ]
      +          },
      +          "score": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "tokens": {
      +            "type": [
      +              "integer",
      +              "null"
      +            ]
      +          },
      +          "truncated": {
      +            "type": [
      +              "boolean",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": [
      +          "object",
      +          "null"
      +        ]
      +      },
      +      "type": [
      +        "array",
      +        "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