Skip to main content
Glama

rerank

rerank
Read-only

Rerank up to 100 documents by relevance to a query (BGE reranker). Returns indices and scores, best first. Drop-in step for RAG and search pipelines. Costs $0.003 USDC per call (x402).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
top_kNo
documentsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, openWorldHint=true), so the bar is lower; the description still adds real value by disclosing the 100-document cap, the return contract (indices and scores, best first), and a concrete per-call cost of $0.003 USDC via x402. It does not say what happens when more than 100 documents are supplied or whether calls are metered/throttled.

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?

Four short sentences, front-loaded with the operation and scope before the pipeline-fit and cost details; every sentence carries information. The trailing '(x402)' parenthetical is slightly cryptic, but overall it is tight and well-ordered.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description usefully describes the return payload (indices and scores, best first), and the readOnly annotation covers safety. The remaining gaps are minor: top_k behavior and the failure mode above 100 documents.

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 description coverage is 0%, so the description carries the burden. It constrains 'documents' (up to 100) and clarifies 'query' semantics (relevance ranking), but says nothing about top_k, which is the one parameter whose behavior is genuinely non-obvious given the returned result ordering.

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 + resource (rerank documents by relevance to a query), quantifies the scope (up to 100 documents), and names the underlying model (BGE reranker). An agent can distinguish this from siblings like embed, embeddings, or search without opening the schema.

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?

Places the tool clearly in a workflow ('drop-in step for RAG and search pipelines'), which tells the agent when it belongs. It stops short of naming alternatives or exclusions (e.g., use embed/vectors for initial retrieval, rerank only as a second stage), so the routing guidance is contextual rather than explicit.

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