Back to full roadmap
topicadvanced★ Pro
Streaming Tool Calls
Tool calls stream incrementally — UI can show 'tool being selected', 'parameters' in real-time.
2 hours1 resources1 prereqs
In streaming mode, the model emits the tool call token-by-token. You catch partial events and show progressive UI like "Searching the web..." → "Querying: 'AI agent benchmarks 2026'".
Anthropic events: content_block_start (tool_use) → content_block_delta (input_json_delta) → content_block_stop.
Best practice: parse partial JSON gracefully (tip: json5 or jsonrepair library). Render spinner + tool name + parsed params live.