Skip to main content
Glama

FMF Tools AI

rerank

Rerank documents for a query ($0.001 per call, paid via MPP on Tempo). Score and sort up to 100 documents by relevance to a query with a cross-encoder (BAAI bge-reranker-base, MIT licence). Returns index, relevance score (0-1) and text, best first; top_n to truncate. Ideal after search or embeddings retrieval. HTTP POST https://mpp-ai.fmf-x402.workers.dev/mpp/rerank. This MCP wrapper does not settle payment by itself; call with an MPP Payment Authorization header, or use mppx against the HTTP route.

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": {
      "query": "<query>",
      "documents": "<documents>"
    },
    "name": "rerank"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes
top_nNo
documentsYesup to 100 documents, 4,000 chars each

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses cost ($0.001 per call, MPP on Tempo), the required MPP Payment Authorization header, that the wrapper does not settle payment itself, the HTTP endpoint, hard limits (100 documents, 4,000 chars each) and the ordering of results.

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 cost, then mechanics, then the payment caveat; every clause carries information. It is a single dense paragraph, and the endpoint URL plus payment wording make it longer than strictly necessary for selection.

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?

There is no output schema, yet the description fully specifies the return values (index, 0-1 relevance score, text, best first), alongside auth, cost, and size limits. Nothing an agent needs to call it correctly is missing.

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 coverage is only 33% (only documents is documented), so the description compensates by explaining top_n truncation and tying documents to the 100-item limit. Query semantics are only implied rather than spelled out, leaving a small gap.

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 (rerank) and resource (documents for a query), names the concrete model (BAAI bge-reranker-base) and the output shape, which distinguishes it from the siblings embeddings/chat/translate.

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

Usage Guidelines4/5

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

"Ideal after search or embeddings retrieval" places the tool in a pipeline and implicitly separates it from embeddings, which retrieves rather than reranks. It does not state exclusions or when a plain search is preferable, so it stops short of full when/when-not guidance.

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.

Resources