Skip to main content
Glama

rerank

Read-only

Rerank documents (Cohere/Jina-compatible) — Cohere/Jina-style rerank for RAG and search: POST {query, documents: up to 100 strings or {text}, optional top_n, return_documents} and get documents sorted by relevance_score (bge-reranker-base cross-encoder). Pairs with /v1/embeddings. Price: $0.002 USDC (Base, via x402).

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
queryYeshow do I return a damaged item
documentsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/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, destructiveHint=false, openWorldHint=true), and the description goes beyond them with real operational facts: the 100-document cap, the underlying model, and a concrete price of $0.002 USDC on Base via x402. The paid-x402 path is exactly the kind of non-obvious behavior an agent must know before calling, though failure/limit behavior for over-cap input is unstated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is compact and front-loads the resource, but it restates the same idea twice ('Rerank documents (Cohere/Jina-compatible) — Cohere/Jina-style rerank'), which duplicates the title and annotations. The dense run-on style packs the payload well but wastes the opening on redundancy.

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?

For a two-parameter, no-output-schema inference tool, the description supplies what is missing elsewhere: the return shape (sorted by relevance_score), the model, the document cap, and the payment requirement. Complete enough to invoke correctly, with the only real gap being the undocumented top_n/return_documents mismatch with the schema.

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?

With 50% schema coverage the description does useful work by explaining that documents can be plain strings or {text} objects and are capped at 100. However, it advertises 'optional top_n, return_documents' that do not appear in the input schema at all, which can lead an agent to pass arguments the declared contract does not accept. The schema's own query 'description' is just an example string, so the description adds value but is partly out of sync with 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?

States a specific verb and resource ('Rerank documents ... Cohere/Jina-style rerank for RAG and search') and says exactly what comes back: documents sorted by relevance_score from a bge-reranker-base cross-encoder. It also positions itself against the sibling by noting it 'Pairs with /v1/embeddings', so an agent can separate the two stages 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 Guidelines3/5

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

Usage is implied rather than prescribed: the description says it is for 'RAG and search' and pairs with /v1/embeddings, which hints at the embeddings-then-rerank workflow. But it never states the ordering explicitly, nor says when reranking is unnecessary or what to use instead of it.

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