pub trait StreamingTool:
Send
+ Sync
+ 'static {
// Required methods
fn name(&self) -> &str;
fn description(&self) -> &str;
fn parameters(&self) -> Option<Value>;
fn run<'life0, 'async_trait>(
&'life0 self,
args: Value,
yield_tx: Sender<Value>,
) -> Pin<Box<dyn Future<Output = Result<(), ToolError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A streaming tool — runs in background, yields multiple results.
Required Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Human-readable description of what this tool does.
Sourcefn parameters(&self) -> Option<Value>
fn parameters(&self) -> Option<Value>
JSON Schema for the tool’s input parameters, or None if parameterless.