pub struct ToolConstraints {
pub allowed_modes: Option<Vec<String>>,
pub max_results_per_call: Option<usize>,
pub max_items_per_call: Option<usize>,
pub default_response_format: Option<String>,
pub max_bytes_per_read: Option<usize>,
}
Expand description
Scoped, optional constraints for a tool to align with safe defaults
Fields§
§allowed_modes: Option<Vec<String>>
Whitelisted modes for tools that support modes (e.g., ‘terminal’)
max_results_per_call: Option<usize>
Cap on results for list/search-like tools
max_items_per_call: Option<usize>
Cap on items scanned for file listing
default_response_format: Option<String>
Default response format if unspecified by caller
max_bytes_per_read: Option<usize>
Cap maximum bytes when reading files
Trait Implementations§
Source§impl Clone for ToolConstraints
impl Clone for ToolConstraints
Source§fn clone(&self) -> ToolConstraints
fn clone(&self) -> ToolConstraints
Returns a duplicate of the value. Read more
1.0.0 · 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 ToolConstraints
impl Debug for ToolConstraints
Source§impl Default for ToolConstraints
impl Default for ToolConstraints
Source§fn default() -> ToolConstraints
fn default() -> ToolConstraints
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ToolConstraints
impl<'de> Deserialize<'de> for ToolConstraints
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 ToolConstraints
impl RefUnwindSafe for ToolConstraints
impl Send for ToolConstraints
impl Sync for ToolConstraints
impl Unpin for ToolConstraints
impl UnwindSafe for ToolConstraints
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