tool_result_message: Create Tool Result Message

View source: R/tool.R

tool_result_messageR Documentation

Create Tool Result Message

Description

Create a message representing the result of a tool call. Used to send tool execution results back to the LLM.

Usage

tool_result_message(tool_call_id, result, is_error = FALSE)

Arguments

tool_call_id

The ID of the tool call this result responds to.

result

The result content (will be converted to string if needed).

is_error

If TRUE, indicates this result is an error message.

Value

A list representing a tool result message.


aisdk documentation built on May 29, 2026, 9:07 a.m.