Skip to main content
Glama
derwells

sieve

by derwells

Rerank candidates against a question

jev_rank

Rank candidates by relevance to a question, returning sorted IDs with probabilities and cost usage. Set top-k or threshold to filter results.

Instructions

Score each candidate for relevance to a question and return [{id, probability}] sorted by probability, plus token and cost usage. Candidates are truncated to 2000 characters and sent 40 per request.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_kNoReturn at most this many results; null returns all.
questionYesWhat the candidates are being ranked against.
thresholdNoDrop candidates scoring below this probability.
candidatesYesCandidates as [{id, text}]. Missing ids fall back to list position.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful non-obvious constraints: candidates are truncated to 2000 characters, processed 40 per request, and the response includes token/cost usage. These are valuable operational details. It does not mention rate limits, failure modes, or side effects, but for a stateless rerank operation the disclosed behavior is reasonably sufficient.

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?

The description is two sentences with no filler. The first sentence front-loads the core purpose and output format; the second adds the key processing constraints. Every sentence earns its place, and the structure makes the tool easy to scan.

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 tool of this complexity, the description covers the essential invocation context: what it returns, how candidates are truncated, and the request batching. The output schema exists to document return values, so that burden is shared. It omits edge cases like maximum candidate count or error handling, but those are not necessary for correct invocation in most agent workflows.

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?

The input schema has 100% description coverage, so the baseline is 3. The tool description adds no new meaning beyond the schema: it does not explain top_k or threshold beyond what the schema already says, and the candidate shape is also already documented. The description's output-format reference reinforces the parameter purpose but does not supplement it.

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 clearly states the verb ('Score'), the resource ('each candidate'), and the outcome ('return [{id, probability}] sorted by probability, plus token and cost usage'). This goes beyond the title's 'Rerank' by specifying the exact output shape. However, it does not distinguish the tool from its siblings (jev_search, jev_grep), so an agent cannot tell when ranking should replace searching or grepping.

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 explicit guidance on when to use jev_rank versus the sibling tools. The description does not mention that this should be used after candidates have already been retrieved, nor does it contrast with jev_search or jev_grep. The intended use is only implied by the phrase 'Score each candidate for relevance to a question', which is not enough for an agent to make a routing decision.

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

Deploy Server

Other Tools