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

Helper module used to build `Annotations` structure.

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

## Short example:

```elixir
%Annotations{}
  |> Annotations.audience(["user", "assistant"])
  |> Annotations.priority(0.8)
  |> Annotations.last_modified("2025-01-12T15:00:58Z")
  |> Annotations.build()
```

Result:

```elixir
%{
  priority: 0.8,
  audience: ["user", "assistant"],
  lastModified: "2025-01-12T15:00:58Z"
}
```

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

## Fields

| Field | Setter | Type | Required |
|---|---|---|---|
| `audience` | `audience/2` | [String.t()] \| nil | no |
| `priority` | `priority/2` | number() \| nil | no |
| `lastModified` | `last_modified/2` | string | no |

# `t`

```elixir
@type t() :: %OzMcp.Structs.Annotations{
  audience: [String.t()] | nil,
  lastModified: String.t() | nil,
  priority: number() | nil
}
```

# `audience`

```elixir
@spec audience(t(), [String.t()] | nil) :: t()
```

# `build`

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

# `last_modified`

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

# `priority`

```elixir
@spec priority(t(), number() | nil) :: t()
```

# `validate_priority`

```elixir
@spec validate_priority(term()) :: :ok
```

Checks a priority value. `nil` (not set) and each number from 0 to 1 are
valid: 1 means most important, 0 means least important.

Spec: `priority?: number`.

---

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