Built-in tool source (source: "builtin") — SPEC §4A.
The default toolset toolnexus ships so an agent can act with zero custom
wiring: opencode's built-ins, ported with identical tool names + input
schemas. Every tool obeys the uniform Tool/ToolResult contract: a failure is
a %ToolResult{is_error: true}, never a raise across the boundary. Paths
resolve relative to the process working directory unless absolute.
The ten tools, in fixed parity order: bash, read, write, edit, grep, glob, webfetch, question, apply_patch, todowrite.
Summary
Functions
Whether the builtin source is on. Default ON. Same precedence as MCP:
disabled: true wins, else enabled: false disables, otherwise enabled.
Resolve the active builtin tools for a config. Whole-source-off wins and
returns []. Otherwise all ten are on; a tools name→bool map drops any
tool mapped to false (all-on baseline; true/absent stay on; unknown
names are ignored). SPEC §4A.
Build the ten built-in tools (each source: "builtin"). The order is fixed
for parity: bash, read, write, edit, grep, glob, webfetch, question,
apply_patch, todowrite.
Functions
Whether the builtin source is on. Default ON. Same precedence as MCP:
disabled: true wins, else enabled: false disables, otherwise enabled.
@spec load(nil | boolean() | map()) :: [Toolnexus.Tool.t()]
Resolve the active builtin tools for a config. Whole-source-off wins and
returns []. Otherwise all ten are on; a tools name→bool map drops any
tool mapped to false (all-on baseline; true/absent stay on; unknown
names are ignored). SPEC §4A.
@spec tools() :: [Toolnexus.Tool.t()]
Build the ten built-in tools (each source: "builtin"). The order is fixed
for parity: bash, read, write, edit, grep, glob, webfetch, question,
apply_patch, todowrite.