pub struct Tool {
pub name: String,
pub description: Option<String>,
pub input_schema: Value,
pub cache_control: Option<CacheControl>,
pub strict: Option<bool>,
}Expand description
Tool definition for Claude to use
Fields§
§name: StringTool name
description: Option<String>Optional tool description
input_schema: ValueJSON schema for tool input
cache_control: Option<CacheControl>Optional cache control for prompt caching
strict: Option<bool>Enable strict mode for tool input validation (beta)
When enabled, tool inputs must exactly match the schema with no additional properties. Requires a structured outputs beta header to be enabled.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tool
impl<'de> Deserialize<'de> for Tool
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
impl Eq for Tool
impl StructuralPartialEq for Tool
Auto Trait Implementations§
impl Freeze for Tool
impl RefUnwindSafe for Tool
impl Send for Tool
impl Sync for Tool
impl Unpin for Tool
impl UnwindSafe for Tool
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