Skip to main content
Glama

Rank passages by relevance to a query

seb_rerank
Read-only

Use to rerank retrieved passages, search results or memories for one query with Seb-rerank (preview), a small dedicated relevance model. Supply the query and 1–100 passages, scored exactly as given (a passage that does not fit the 32,768-token context window returns INPUT_TOO_LONG with its index); optionally replace the default relevance question with task-specific instructions. Returns, in input order, each passage index with a relevance score (a logit; higher is more relevant) and probability = sigmoid(score). Sort by score. No explanation. Model estimates can be wrong. Requires a funded account token; charges input tokens.

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>",
      "passages": "<passages>"
    },
    "name": "seb_rerank"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesThe search query or question, up to 2,000 characters.
passagesYes1–100 candidate passages in input order, scored exactly as given (never cut). Each passage with the query must fit the 32,768-token context window; one that does not returns INPUT_TOO_LONG with its index.
instructionsNoOptional task-specific relevance question, e.g. "Decide whether the memory passage helps answer the user's question." Defaults to "Decide whether the candidate passage answers the query."

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / passages / description
      Previous value: -"1–100 candidate passages in input order. Each is scored on its first 512 words."New value: +"1–100 candidate passages in input order, scored exactly as given (never cut). Each passage with the query must fit the 32,768-token context window; one that does not returns INPUT_TOO_LONG with its index."
    • removedInput schema / properties / passages / items / maxLength
      Removed value: -20000
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond readOnlyHint/openWorldHint: it discloses cost ("Requires a funded account token; charges input tokens"), the failure mode (INPUT_TOO_LONG with the offending index when the 32,768-token window is exceeded), and that passages are never truncated. It also warns that model estimates can be wrong and specifies the exact return shape (index, logit score, sigmoid probability, input order).

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 the use case, then output semantics, then cost and caveats — no filler sentences. The prose is dense with nested parentheses and semicolons, which makes it slightly harder to scan than it needs to be, but nothing is redundant.

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, and the description fully compensates by describing the return structure, ordering, and score interpretation. Cost, error behavior, and context-window limits are all covered, so an agent has everything needed to call this 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 coverage is 100%, so baseline is 3, and the description adds real meaning on top: it clarifies that passages are "scored exactly as given (never cut)" and that instructions replace a documented default relevance question. The query parameter's semantics (up to 2,000 characters) are left entirely to 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?

"Use to rerank retrieved passages, search results or memories for one query with Seb-rerank" gives a specific verb (rerank), a specific resource (passages/search results/memories), and a scope (one query, 1–100 passages). It also states a negative capability ("No explanation"), which separates it from generative siblings like seb_decide or seb_fin_analyze.

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?

The opening "Use to rerank..." establishes the triggering context clearly, and it explains the optional path (replace the default relevance question with task-specific instructions). It stops short of naming when to prefer a sibling tool or when not to use this one, so no explicit alternatives are offered.

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