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
assembled tool calls on the returned array. Accepts either:
typeof agent) — union is derived from the
agent's declared tools via InferToolCalls;typeof tools) — union is derived
from InferToolCalls (parallel to ToolCallsFromTools).When omitted, returns the plain AssembledToolCall[] union used by
the controller.
useToolCalls(
stream: AnyStream,
target: SelectorTarget
): AssembledToolCall<string, unknown, unknown>[]| Name | Type | Description |
|---|---|---|
stream* | AnyStream | |
target | SelectorTarget |