command
Version:
v0.1.8
Opens a new window with list of versions in this module.
Published: Mar 3, 2026
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
This example shows how to:
- Enable only a subset of built-in tools via
EnabledBuiltinTools
- Append a custom
EchoTool via CustomTools
- Keep legacy
Tools override semantics unchanged (not used here)
Run
export ANTHROPIC_API_KEY=sk-ant-...
go run ./examples/05-custom-tools
What happens
- Registers built-ins
bash and file_read (because EnabledBuiltinTools lists them)
- Skips other built-ins (empty list would disable all)
- Appends a custom
echo tool
- Sends a prompt instructing the model to call
echo
Adjust the options in main.go to:
- Enable all built-ins: set
EnabledBuiltinTools: nil
- Disable all built-ins: set
EnabledBuiltinTools: []string{}
- Add more custom tools: append to
CustomTools
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.