pub struct Tool {
pub name: String,
pub description: String,
pub endpoint: String,
pub method: HttpMethod,
pub scope: Option<String>,
pub input_schema: Option<Value>,
pub response: Option<ResponseConfig>,
pub tags: Vec<String>,
pub hint: Option<String>,
pub examples: Vec<String>,
}Fields§
§name: String§description: String§endpoint: String§method: HttpMethod§scope: Option<String>Scope required to use this tool (e.g. “tool:web_search”)
input_schema: Option<Value>JSON Schema for tool input
response: Option<ResponseConfig>Response extraction config
Tags for discovery (e.g., [“search”, “real-time”])
hint: Option<String>Short hint for the LLM on when to use this tool
examples: Vec<String>Example invocations
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
Auto Trait Implementations§
impl Freeze for Tool
impl RefUnwindSafe for Tool
impl Send for Tool
impl Sync for Tool
impl Unpin for Tool
impl UnsafeUnpin 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