AddBuiltIn adds one or more built-in tool patterns. Pass a specific tool name (e.g. "bash") or "*" to match all built-in tools.
(names ...string)
| 54 | // AddBuiltIn adds one or more built-in tool patterns. Pass a specific tool |
| 55 | // name (e.g. "bash") or "*" to match all built-in tools. |
| 56 | func (s *ToolSet) AddBuiltIn(names ...string) *ToolSet { |
| 57 | for _, n := range names { |
| 58 | validateToolName("builtin", n) |
| 59 | s.items = append(s.items, "builtin:"+n) |
| 60 | } |
| 61 | return s |
| 62 | } |
| 63 | |
| 64 | // AddCustom adds a custom-tool pattern. Matches tools registered via |
| 65 | // [SessionConfig.Tools] or via custom agents. |