pub struct ToolSpec {
pub name: String,
pub description: String,
pub input_schema: Value,
}Expand description
LLM-facing description of one tool. input_schema is a JSON Schema
object the model uses to generate well-formed tool_call.arguments.
Shared between providers — OpenAI wraps it in {type:"function", function:{...}},
future Anthropic client will pass it as Messages API input_schema verbatim.
Fields§
§name: String§description: String§input_schema: ValueJSON Schema for tool_call.arguments. Must be an object-typed schema.
Trait Implementations§
impl Eq for ToolSpec
impl StructuralPartialEq for ToolSpec
Auto Trait Implementations§
impl Freeze for ToolSpec
impl RefUnwindSafe for ToolSpec
impl Send for ToolSpec
impl Sync for ToolSpec
impl Unpin for ToolSpec
impl UnsafeUnpin for ToolSpec
impl UnwindSafe for ToolSpec
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