Skip to main content
Glama
TextLite MCP Server

TextLite MCP Server

Official
by Mantri-AI

Rerank Passages

rerank_passages

Reranks passages with a cross-encoder to return them in relevance order for a query, helping you prioritize the most useful text for search or RAG workflows.

Instructions

Rerank passages with a cross-encoder; returns passages in relevance order (no raw scores).

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": "rerank_passages"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes
top_kNo
passagesYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It does add genuine behavioral context by stating the output is in relevance order and contains no raw scores, which prevents an agent from expecting numeric scores as semantic_similarity might give. However, it omits cost/latency implications of a cross-encoder pass, input size limits, and failure behavior.

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?

A single sentence, front-loaded with the action and mechanism, with the output caveat appended. Nothing is wasted or buried.

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

Completeness3/5

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

The output schema exists, so return values need not be explained, and the description is honest about the no-scores constraint. But for a three-parameter tool with zero schema descriptions and no annotations, it should explain the query/passages relationship and top_k behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for three undocumented parameters. It only vaguely gestures at 'passages' and says nothing about the required 'query' parameter or how 'top_k' (default 5) truncates the ranked output, leaving the agent to infer this from parameter names alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Rerank passages') and names the mechanism ('cross-encoder'), which distinguishes it from retrieval siblings like semantic_search that fetch rather than reorder. It stops short of explicitly naming a sibling, but the purpose is unmistakable.

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

Usage Guidelines2/5

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

There is no guidance on when to rerank versus using semantic_search or semantic_similarity directly, no prerequisites, and no note on passage limits. The only implied usage is that you supply passages you already have, which the agent must infer.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.