Altar.ADM.ToolResult (Altar v0.1.2)
View SourceToolResult correlates a FunctionCall
with its outcome.
Use new/1
to construct validated instances. This simple v1 structure records
whether the result is an error and carries the content payload.
Summary
Functions
Construct a new validated ToolResult
.
Types
Functions
Construct a new validated ToolResult
.
Accepts a map or keyword list with:
:call_id
(required): non-empty string; correlates with the triggering call:content
(optional): any term; ifis_error: true
, should ideally be a map like%{error: "..."}
:is_error
(optional): boolean, defaults tofalse
Returns {:ok, %ToolResult{}}
on success or {:error, reason}
.