Event yielded during tool execution to report streaming progress. Tools can yield zero or more of these events before returning the final ToolResult.
const streamEvent = new ToolStreamEvent({ data: 'Processing step 1...'})// Or with structured dataconst streamEvent = new ToolStreamEvent({ data: { progress: 50, message: 'Halfway complete' }}) Copy
const streamEvent = new ToolStreamEvent({ data: 'Processing step 1...'})// Or with structured dataconst streamEvent = new ToolStreamEvent({ data: { progress: 50, message: 'Halfway complete' }})
Readonly
Discriminator for tool stream events.
Optional
Caller-provided data for the progress update. Can be any type of data the tool wants to report.
Event yielded during tool execution to report streaming progress. Tools can yield zero or more of these events before returning the final ToolResult.
Example