# `OzMcp.Structs.ToolUseContent`
[🔗](https://github.com/oz-elixir/oz_mcp/blob/v0.9.0/lib/oz_mcp/structs/tool_use_content.ex#L1)

Helper module used to build `ToolUseContent` structure: a request of the
model to call a tool, inside a sampling message.

_(MCP protocol: 2025-11-25)_

## Short example:

```elixir
%ToolUseContent{}
  |> ToolUseContent.id("call_1")
  |> ToolUseContent.name("get_weather")
  |> ToolUseContent.input(%{"city" => "Paris"})
  |> ToolUseContent.build()
```

Result:

```elixir
%{type: "tool_use", id: "call_1", name: "get_weather", input: %{"city" => "Paris"}}
```

Specification: [ToolUseContent](https://modelcontextprotocol.io/specification/2025-11-25/schema#tooluse)

## Fields

| Field | Setter | Type | Required |
|---|---|---|---|
| `id` | `id/2` | string | yes |
| `name` | `name/2` | string | yes |
| `_meta` | `_meta/2` | map | no |
| `input` | `input/2` | map | yes |

# `t`

```elixir
@type t() :: %OzMcp.Structs.ToolUseContent{
  _meta: map() | nil,
  id: String.t(),
  input: map(),
  name: String.t()
}
```

# `build`

```elixir
@spec build(t()) :: map()
```

# `id`

```elixir
@spec id(t(), String.t()) :: t()
```

# `input`

```elixir
@spec input(t(), map()) :: t()
```

# `name`

```elixir
@spec name(t(), String.t()) :: t()
```

---

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