Skip to main content
Glama
aiexp1

Tanod MCP server

mlpeek: rerank documents against a query

rerank_documents
Read-onlyIdempotent

Rank up to 100 documents by relevance to a query and return sorted scores, so you can select the best matches. Useful for search, filtering, or answer grounding.

Instructions

mlpeek: Rerank up to 100 documents against a query. For pair scores use text_similarity. 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. 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. The submitted text is never logged or stored. Docs: https://tanod.dev/learn/embeddings-rerank-ner-mcp-server.html

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. First observedv0.3.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnly, idempotent, non-destructive, no open world); the description adds substantial non-obvious behavior: the pinned open model and its 512-token truncation, 32,768-token request cap returning 422, 503 when the model is unavailable, latency range, pricing, free daily quota, and the privacy guarantee that text is never logged or stored.

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-loads purpose, scope, and the sibling alternative in the first sentence, then layers constraints, output shape, costs, and limits. Dense and largely earned, though the license strings and docs URL are slightly beyond what selection requires.

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?

An output schema exists, yet the description still sketches the return fields (index, rank, score as a 0-1 sigmoid, logit) and covers error conditions, cost, quota, latency, and privacy — everything needed to call and interpret it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds meaning the schema does not carry — each text is cut at the model's 512-token window (longest side first) and `top_k` keeps the best k with results sorted best first — which affects how callers should size documents.

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?

States a specific verb and resource (rerank documents against a query), fixes the scope (up to 100 documents), and names the sibling it is not — 'For pair scores use text_similarity.' An agent can separate it from text_similarity/embed_texts without opening any 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?

Names the alternative explicitly and the condition that selects it (pair scores → text_similarity), which is the primary confusion point in the embed/similarity/rerank family. No further when-to-use inference is required for the common decision.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools