# `Omni.Content.ToolUse`
[🔗](https://github.com/aaronrussell/omni/blob/v2.0.0/lib/omni/content/tool_use.ex#L1)

A tool use content block: the model asking for a tool to be run.

Only a model produces these, in assistant messages. Each is answered by an
`Omni.Content.ToolResult` in the next user message.

## Struct fields

- `:id` - the provider's id for this tool use, which its result names
- `:name` - the name of the tool
- `:input` - the arguments, as the map the model wrote, with string keys
- `:signature` - a token some providers attach and expect back on later
  turns. Omni handles it

# `t`

```elixir
@type t() :: %Omni.Content.ToolUse{
  id: String.t(),
  input: map(),
  name: String.t(),
  signature: String.t() | nil
}
```

The model's request to run a named tool with the given input.

# `new`

```elixir
@spec new(Enumerable.t()) :: t()
```

Creates a new tool use content block from a keyword list or map.

---

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