# `ExAthena.Messages.ToolResult`
[🔗](https://github.com/udin-io/ex_athena/blob/v0.7.1/lib/ex_athena/messages.ex#L22)

The outcome of a tool execution, replayed back to the model.

`content` is the LLM-facing text — what the model sees on the next
iteration. `ui_payload` is an optional structured map that hosts
(TUIs, LiveView frontends) can render as rich content (diffs, file
previews, process output) without parsing the text.

`ui_payload` is `nil` for tools that only return text; the loop
only emits `:tool_ui` events when a payload is present.

# `t`

```elixir
@type t() :: %ExAthena.Messages.ToolResult{
  content: String.t(),
  is_error: boolean() | nil,
  tool_call_id: String.t(),
  ui_payload: ui_payload() | nil
}
```

# `ui_payload`

```elixir
@type ui_payload() :: %{kind: atom(), payload: map()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
