Dive

Built-in tools

builtin__take

Keeps the first n items of a list, with no model call.

Behavior

  • Returns the first n items; a shorter list is returned whole.

When to use it

Available toEffect
Any agent or plan stepRead-only

Input

itemsany[]required

The list, usually a template like {{E1.results}}

nintegerrequired

How many items to keep

Output

itemsany[]required
- id: E1
  tool_name: builtin__take
  input:
    items: "{{input.items}}"
    n: "{{input.n}}"