toolCalls
Call Signature
Section titled “Call Signature”toolCalls(
run):ToolCall[]
Returns every tool call observed in a normalized run or session.
Tool results are joined from matching tool_result transcript events when
the transcript contains a result for the call.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”ToolCall[]
Example
Section titled “Example”const names = toolCalls(result).map((call) => call.name);
expect(names).toEqual(["lookupInvoice", "createRefund"]);Call Signature
Section titled “Call Signature”toolCalls(
session):ToolCall[]
Returns every tool call observed in a normalized run or session.
Tool results are joined from matching tool_result transcript events when
the transcript contains a result for the call.
Parameters
Section titled “Parameters”session
Section titled “session”Returns
Section titled “Returns”ToolCall[]
Example
Section titled “Example”const names = toolCalls(result).map((call) => call.name);
expect(names).toEqual(["lookupInvoice", "createRefund"]);