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

Helper module used to build `Icon` structure.

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

## Short example:

```elixir
%Icon{}
  |> Icon.src("https://img.com/icon.png")
  |> Icon.mime_type("image/png")
  |> Icon.sizes(["16x16"])
  |> Icon.theme(:dark)
  |> Icon.build()
```

Result:

```elixir
%{
  mimeType: "image/png",
  theme: :dark,
  src: "https://img.com/icon.png",
  sizes: ["16x16"]
}
```

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

## Fields

| Field | Setter | Type | Required |
|---|---|---|---|
| `src` | `src/2` | string | yes |
| `mimeType` | `mime_type/2` | string | no |
| `sizes` | `sizes/2` | list | no |
| `theme` | `theme/2` | theme() | no |

# `t`

```elixir
@type t() :: %OzMcp.Structs.Icon{
  mimeType: String.t() | nil,
  sizes: list() | nil,
  src: String.t(),
  theme: theme()
}
```

# `theme`

```elixir
@type theme() :: :light | :dark | nil
```

# `build`

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

# `mime_type`

```elixir
@spec mime_type(t(), String.t() | nil) :: t()
```

# `sizes`

```elixir
@spec sizes(t(), list() | nil) :: t()
```

# `src`

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

# `theme`

```elixir
@spec theme(t(), theme()) :: t()
```

---

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