pub trait Tool<R> {
// Required methods
fn name(&self) -> &str;
fn description(&self) -> &str;
fn parameter_schema(&self) -> Value;
fn invoke<'lt>(
&'lt mut self,
data: &str,
) -> Box<dyn Future<Output = ControlFlow<R, String>> + 'lt>;
}Required Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
The description of the tool, provided to the LLM.
Sourcefn parameter_schema(&self) -> Value
fn parameter_schema(&self) -> Value
The JSON schema of the tool parameters.