Skip to main content
Glama

Rerank documents

rerank_documents

Reorders documents based on semantic relevance to a query. Use a specified reranker model and receive the top N results.

Instructions

Rerank documents Reranks documents by relevance to a query using semantic similarity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesReranker model to use
queryYesQuery to rank against
top_nNoNumber of results to return
documentsYesDocuments to rerank
return_documentsNo
Behavior3/5

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

Annotations already indicate readOnlyHint=false and destructiveHint=false, so the description is not required to repeat those. The description adds that reranking uses semantic similarity, which provides some behavioral context. However, it does not disclose whether the operation is stateless, if it modifies original documents, or any rate limits/auth needs. Given the annotations, the description adds moderate value.

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

Conciseness2/5

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

The description is extremely short but contains a repetition ('Rerank documents Reranks documents'), making it awkward and less concise. It could be rephrased as a single clear sentence. The structure is poor, as it essentially repeats the title with minor elaboration.

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

Completeness2/5

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

The tool is moderately complex with 5 parameters, no output schema, and no description of return value. The description does not explain what the tool returns (e.g., reranked list with scores), nor any prerequisites or side effects. With no output schema, the description should provide details on the return format, which it fails to do. Thus, completeness is lacking.

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 high (80%), so baseline is 3. The description does not add any parameter-level meaning beyond what the schema already provides. It does not explain how to choose a model, interpret top_n, or format documents. Since the schema covers most parameters, no further compensation is needed, but no extra value is added.

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 the tool reranks documents by relevance to a query using semantic similarity, which is clear and specific. The verb 'rerank' and resource 'documents' are unambiguous. It effectively distinguishes from sibling tools, as no other sibling handles reranking. However, the description contains a typographical repetition ('Rerank documents Reranks documents'), slightly reducing clarity.

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?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., model availability), use cases, or when not to use it. Among siblings, there are similar document processing tools (e.g., create_embedding, list_files), but no contextual differentiation is given.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hedging8563/tokenlab-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server