Built-in tools
An agent that can only talk isn’t much use. toolnexus ships opencode’s default toolset — 10
built-in tools — so a fresh toolkit can already act: run a command, read and edit files, search,
fetch a URL, ask you a question. createToolkit() with no config at all still gives you a working,
acting agent.
The ten tools
Section titled “The ten tools”| Tool | Does |
|---|---|
bash |
Run a shell command |
read |
Read a file |
write |
Write a file |
edit |
Edit a file in place |
grep |
Search file contents |
glob |
Find files by pattern |
webfetch |
Fetch a URL |
question |
Suspend and ask the user structured questions |
apply_patch |
Apply a patch to the tree |
todowrite |
Maintain a task list |
Names and input schemas match opencode. They surface in the tool schema
(toOpenAI/toAnthropic/toGemini) like MCP tools — not injected into the system prompt — so
the model discovers them the same way it discovers every other source.
On by default — with two levels of off
Section titled “On by default — with two levels of off”Because bash/write/edit/apply_patch run commands and mutate the filesystem, you’ll want to
lock them down on untrusted hosts. There’s a whole-source toggle and a per-tool map.
Turn the whole source off:
const tk = await createToolkit({ builtins: false })tk = await create_toolkit(builtins=False)tk, _ := toolnexus.CreateToolkit(ctx, toolnexus.Options{ Builtins: false })Toolkit tk = Toolkit.create(new Toolkit.Options().builtins(false));await using var tk = await Toolkit.CreateAsync(new Toolkit.Options { Builtins = false });Or drop individual tools on the all-on baseline — here, disable bash while keeping the rest:
const tk = await createToolkit({ builtins: { tools: { bash: false } } })tk = await create_toolkit(builtins={"tools": {"bash": False}})tk, _ := toolnexus.CreateToolkit(ctx, toolnexus.Options{ Builtins: toolnexus.BuiltinsConfig{Tools: map[string]bool{"bash": false}},})Toolkit tk = Toolkit.create(new Toolkit.Options() .builtins(Map.of("tools", Map.of("bash", false))));await using var tk = await Toolkit.CreateAsync(new Toolkit.Options{ Builtins = new Dictionary<string, object?> { ["tools"] = new Dictionary<string, object?> { ["bash"] = false }, },});The same toggle can come from a top-level builtins block in the config the toolkit is built from,
so a deployment can lock the toolset down without touching code.