pub struct ToolSearchConfig {
pub pattern: String,
}Available on crate features
models and anthropic only.Expand description
Provider-level configuration for regex-based dynamic tool discovery.
ToolSearchConfig allows filtering tools by name using a regex pattern.
When set on an Anthropic provider, only tools whose names match the pattern
are loaded per request. When not set, all available tools are loaded.
§Example
use adk_anthropic::ToolSearchConfig;
let config = ToolSearchConfig::new("^(search|fetch)_.*");
assert!(config.matches("search_web").unwrap());
assert!(!config.matches("delete_all").unwrap());Fields§
§pattern: StringRegex pattern for matching tool names.
Implementations§
Source§impl ToolSearchConfig
impl ToolSearchConfig
Trait Implementations§
Source§impl Clone for ToolSearchConfig
impl Clone for ToolSearchConfig
Source§fn clone(&self) -> ToolSearchConfig
fn clone(&self) -> ToolSearchConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ToolSearchConfig
impl RefUnwindSafe for ToolSearchConfig
impl Send for ToolSearchConfig
impl Sync for ToolSearchConfig
impl Unpin for ToolSearchConfig
impl UnsafeUnpin for ToolSearchConfig
impl UnwindSafe for ToolSearchConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more