Subscribe to a scoped tools (tool-call) stream. Same target and
lifecycle rules as useMessages; at the root this just returns
stream.toolCalls.
The optional generic T can be passed to narrow the type of
toolCall.args on the returned array. Accepts either:
typeof agent) — union is derived from the
agent's declared tools;typeof tools) — union is derived
from ToolCallFromTool<T[number]>;DefaultToolCall shape.When omitted, returns the plain AssembledToolCall[] union used by
the controller.
useToolCalls(stream: AnyStream, target: SelectorTarget): AssembledToolCall[]| Name | Type | Description |
|---|---|---|
stream* | AnyStream | |
target | SelectorTarget |