A function tool's output and whether it requests a follow-up reply.

Example

return new ToolResult('Successfully sent DTMF events: 1', { replyRequired: false });

Constructors

Properties

[TOOL_RESULT_SYMBOL]: true = ...
output: unknown

The value to return to the model, such as a string, object, array, or undefined. For a handoff, return handoff({ agent, returns: new ToolResult(...) }).

replyRequired: boolean

Whether this result requests a reply. Defaults to true. false keeps the output in chat history without requesting a reply. Other tool results can still request a reply, and interruption or cancelToolReply() can still prevent one.