#[non_exhaustive]pub struct ToolSearchConfig {
pub enabled: Option<bool>,
pub defer_threshold: Option<u32>,
}Expand description
Overrides the runtime’s built-in tool-search behavior.
Tool search defers tools to keep the model’s active tool set small.
To override the tool-search tool’s implementation, register a Tool
named "tool_search_tool" with Tool::overrides_built_in_tool set to true.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.enabled: Option<bool>Toggle to enable/disable tool search.
defer_threshold: Option<u32>The tool count above which MCP and external tools are deferred behind tool search. When unset, the runtime default (30) applies.
Implementations§
Source§impl ToolSearchConfig
impl ToolSearchConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct an empty ToolSearchConfig; all fields default to unset
(the runtime applies its own defaults).
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
Toggle that enables or disables tool search.
Sourcepub fn with_defer_threshold(self, defer_threshold: u32) -> Self
pub fn with_defer_threshold(self, defer_threshold: u32) -> Self
Set the tool count above which MCP and external tools are deferred behind tool search.
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 moreSource§impl Debug for ToolSearchConfig
impl Debug for ToolSearchConfig
Source§impl Default for ToolSearchConfig
impl Default for ToolSearchConfig
Source§fn default() -> ToolSearchConfig
fn default() -> ToolSearchConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ToolSearchConfig
impl<'de> Deserialize<'de> for ToolSearchConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto 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