Skip to main content
Glama

Rerank documents

rerank

Score up to 32 documents against a query with @cf/baai/bge-reranker-base. Returns indexes and scores, not a rewritten answer. Same daily neuron guard as embed.

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
queryYesThe question, max 8000 characters.
documentsYes1 to 32 documents.

Output Schema

NameRequiredDescriptionDefault
okNo
errorNo
resultsNo
budget_remainingNo
estimated_neuronsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/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 disclose the return shape (indexes and scores, not text), the 32-document cap, and the shared daily neuron quota with embed. It does not say whether results are sorted by score or what happens if more than 32 documents are supplied.

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

Conciseness5/5

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

Three short sentences, front-loaded with the operation and its limit, with no filler. The "same guard as embed" reference is compact and purposeful.

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?

Output schema exists, so return values need not be spelled out beyond the brief note about indexes and scores, and the quota mention covers cost behavior. Only edge-case behavior (over-limit input, ordering) is left unaddressed, which is minor for a two-parameter tool.

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 100%, so both parameters are already documented; the description only restates the 32-document limit and adds the model identifier, without extra syntax or semantics for query or 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?

The description names a specific verb and resource ("Score up to 32 documents against a query") plus the exact model used, and explicitly contrasts the output with a generated answer ("not a rewritten answer"), which separates it from a sibling like ask.

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?

The negative framing ("not a rewritten answer") implies when to prefer this over a generation tool, and the neuron-guard note hints at cost considerations, but there is no explicit statement of when to choose rerank versus embed or ask.

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