WithToolsFilter creates a toolset that only includes the specified tools. If no tool names are provided, all tools are included.
(inner tools.ToolSet, toolNames ...string)
| 11 | // WithToolsFilter creates a toolset that only includes the specified tools. |
| 12 | // If no tool names are provided, all tools are included. |
| 13 | func WithToolsFilter(inner tools.ToolSet, toolNames ...string) tools.ToolSet { |
| 14 | if len(toolNames) == 0 { |
| 15 | return inner |
| 16 | } |
| 17 | |
| 18 | return &filterTools{ |
| 19 | ToolSet: inner, |
| 20 | toolNames: toolNames, |
| 21 | exclude: false, |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | // WithToolsExcludeFilter creates a toolset that excludes the specified tools. |
| 26 | // If no tool names are provided, all tools are included. |
no outgoing calls