Built-in tools
builtin__take
Keeps the first n items of a list, with no model call.
Behavior
- Returns the first
nitems; a shorter list is returned whole.
When to use it
- The top-k cut after
builtin__sort.builtin__rankcuts its own result withtop_k.
| Available to | Effect |
|---|---|
| Any agent or plan step | Read-only |
Input
The list, usually a template like {{E1.results}}
How many items to keep
Output
- id: E1
tool_name: builtin__take
input:
items: "{{input.items}}"
n: "{{input.n}}"