> ## Documentation Index
> Fetch the complete documentation index at: https://graph.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# builtin__score_candidates

> Scores candidate tools for a task from 0 to 1 and selects the best.

## Scoring

* With a decision model, scores are the probabilities of one choice question.
* Large candidate lists are split into several choices, then the leaders compete in a final one.
* Without a decision model, or if that call fails, candidates are ranked by keyword overlap.

## Selection

* `selected` holds candidates at or above `threshold`, topped up to `floor` and capped at `limit`.

| Available to | Effect |
| - | - |
| Any agent or plan step | Read-only |

## Input

**candidates** `object[]` *required*

Objects with `name` and `description`

**chunk\_size** `integer`

Most options per choice question, up to 255; larger sets are split into choices sent together, then a final choice among every candidate that reached the threshold. Default 250

**floor** `integer`

Fewest candidates to select, taking the best below the threshold when needed; default 0

**limit** `integer`

Most candidates to select

**model** `string`

The decision model role; default decider

**query** `string` *required*

The task the candidates are scored against

**question** `string` *required*

The choice question; the task follows it

**threshold** `number`

Minimum score to be selected; default 0.5

## Output

**fallback\_reason** `string`

**mode** `enum\<string\>` *required*

Available options: `decision`, `keyword`

**scored** `object[]` *required*

**selected** `object[]` *required*

```yaml Plan step theme={null}
- id: E1
  tool_name: builtin__score_candidates
  input:
    query: "{{input.query}}"
    candidates: "{{input.candidates}}"
    question: "{{input.question}}"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.