# `CliSubprocessCore.Payload.ToolUse`
[🔗](https://github.com/nshkrdotcom/cli_subprocess_core/blob/v0.1.0/lib/cli_subprocess_core/payload.ex#L210)

Represents a tool invocation request.

# `t`

```elixir
@type t() :: %CliSubprocessCore.Payload.ToolUse{
  extra: map(),
  input: map(),
  metadata: map(),
  tool_call_id: String.t() | nil,
  tool_name: String.t() | nil
}
```

# `new`

```elixir
@spec new(keyword() | map() | struct()) :: struct()
```

# `parse`

```elixir
@spec parse(keyword() | map() | struct()) ::
  {:ok, struct()}
  | {:error,
     {:invalid_payload, module(), CliSubprocessCore.Schema.error_detail()}}
```

# `parse!`

```elixir
@spec parse!(keyword() | map() | struct()) :: struct()
```

# `schema`

```elixir
@spec schema() :: Zoi.schema()
```

# `to_map`

```elixir
@spec to_map(struct()) :: map()
```

---

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