Where they live
Drop files into one of:.opencode/tool/— project-scoped, checked in with the repo..opencode/tools/— accepted as an alias for the above.
Anatomy of a tool
A custom tool declares its name, description, and input schema in a header, then implements the behavior. The exact shape depends on the runtime you pick (shell script, TypeScript, etc.), but every tool must:- Advertise a JSON Schema for its inputs so the model knows how to call it.
- Return a value (or an error) that Bolt can render in the TUI and feed back to the model.
bash and grep, and is gated by the same permission system.
When to use a custom tool vs. an MCP server
- Custom tool — small, project-specific, no reuse across projects. Fast to write.
- MCP server — shared across projects, or wraps a real external service with auth. See MCP Servers.
- Plugin tool — distributed as an npm package alongside other extension points. See Plugins.