Skip to main content
When an agent calls a tool during a stream, you receive tool_start and tool_end events. The SDK provides typed helpers to parse these into readable tool event objects.

Tool event types

Each tool type has a dedicated interface with readable field names: All share a common shape: start (boolean), the tool-specific name field, action, result, and error.

Parse tool events

Tool names in the stream

The raw toolName field in tool_start/tool_end events maps to tool types:

Display metadata

Every tool event includes optional display metadata from the runtime:
Use display.name and display.summary for UI rendering — they’re already formatted for humans.

Event bus integration

Tool lifecycle events are also emitted on the SDK event bus: