result

fun result(id: String?, tool: String, content: String)(source)

Adds a tool result message to the prompt.

This method creates a Message.Tool.Result instance and adds it to the message list. Tool results represent the output from executing a tool with the provided parameters.

Parameters

id

The unique identifier for the tool result message.

tool

The name of the tool that provided the result.

content

The content or payload of the tool result.


Deprecated

Use result(id, tool, content) instead

Replace with

result(id, tool, content)

Adds a tool result message to the prompt.

Tool results represent the output from executing a tool.

Parameters

result

The tool result message to add