Advanced 3 - Discovery mode for large toolsets
Earlier tutorials assume direct tool injection: every tool's full JSON schema is visible up front. That works for small apps. Large toolsets waste context and make the model pick worse tools.
Discovery mode keeps context_builder meta-tools visible and
hides most domain tools behind search. The agent finds a tool with
search_tools, learns params with get_tool, then calls
execute_tool (or calls the tool by name when the runtime routes
it).
Catalog meta-tools in this build:
search_toolsget_toolexecute_toolrun_parallelbackground_runuse_skillcall_appask_user
There are no list_categories / browse_category tools in the
current catalog. Older tutorials that used those names are obsolete.
Force the mode with:
runtime:
tool_injection: discovery # or direct | compact_direct
Otherwise the runtime picks from context budget vs tool schema size. See Tools.
Minimal app sketch
schema_version: 2
app:
app_id: discovery-demo
name: Discovery demo
version: "0.1.0"
runtime:
tool_injection: discovery
agents:
- id: main
role: worker
brain:
provider: ollama
model: qwen25-7b-gpu:latest
backend: openai_compat
config:
base_url: http://localhost:11434/v1
api_key: ollama
system_prompt: |
Prefer search_tools when you are unsure which tool exists.
Call get_tool before first use of an unfamiliar tool.
tools:
modules:
filesystem: {}
bash: {}
web: {}