pub struct ToolParameterSchema {
pub schema_type: String,
pub description: Option<String>,
pub properties: Option<HashMap<String, ToolParameterSchema>>,
pub required: Option<Vec<String>>,
pub items: Option<Box<ToolParameterSchema>>,
pub enum_values: Option<Vec<Value>>,
pub default: Option<Value>,
pub additional: HashMap<String, Value>,
}
Expand description
JSON Schema definition for tool parameters
Fields§
§schema_type: String
JSON Schema type (object, string, number, boolean, array, null)
description: Option<String>
Description of this parameter
properties: Option<HashMap<String, ToolParameterSchema>>
Properties for object types (nested schemas)
required: Option<Vec<String>>
Required property names for object types
items: Option<Box<ToolParameterSchema>>
Items schema for array types
enum_values: Option<Vec<Value>>
Enum values for restricted choices
default: Option<Value>
Default value
additional: HashMap<String, Value>
Additional schema properties (min, max, pattern, etc.)
Implementations§
Source§impl ToolParameterSchema
impl ToolParameterSchema
Trait Implementations§
Source§impl Clone for ToolParameterSchema
impl Clone for ToolParameterSchema
Source§fn clone(&self) -> ToolParameterSchema
fn clone(&self) -> ToolParameterSchema
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 ToolParameterSchema
impl Debug for ToolParameterSchema
Source§impl<'de> Deserialize<'de> for ToolParameterSchema
impl<'de> Deserialize<'de> for ToolParameterSchema
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 ToolParameterSchema
impl RefUnwindSafe for ToolParameterSchema
impl Send for ToolParameterSchema
impl Sync for ToolParameterSchema
impl Unpin for ToolParameterSchema
impl UnwindSafe for ToolParameterSchema
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