Dive

Built-in plans

search_tools

Finds the catalog tools that fit a task, most likely first.

How it works

  • With a decision model configured, the model chooses among every tool, and its probabilities rank them.
  • Without one, keywords rank them.
  • Tools below min_probability are dropped, so the list can be empty.

compose_plan and the drafter agents use this plan to find tools. Every agent also calls it to load the tools on its list: called from an agent, it searches only the tools that agent may call, and the tools it returns are loaded for the rest of the thread.

Input

querystringrequired

The task the tools are for, as one step

min_probabilitynumberdefault: 0.1

Minimum probability for a tool to be returned

limitintegerdefault: 10

Most tools to return

modelstringdefault: decider

The decision model role that chooses

chunk_sizeintegerdefault: 250

Most tools per choice question, up to 255; larger catalogs are split, then every tool reaching min_probability meets the others in a final choice

schemasbooleandefault: true

Include each tool's input schema and output shape

Output

modestring

How tools were ranked, decision (a decision model chose) or keyword (keyword match).

toolsobject[]

The tools that fit, most likely first, with their scores and, when schemas is on, their input schemas and output shapes.

alwaysstring[]

Tools that are always offered, from [tools].always_loaded. They're never ranked.

Steps

StepCalls
catalogbuiltin__catalog_tools
pickedbuiltin__score_candidates
describedbuiltin__describe_tools
- id: E1
  tool_name: plan__search_tools
  input:
    query: "{{input.query}}"