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

Helper module used to build `ToolAnnotations` structure.

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

## Short example:

```elixir
%ToolAnnotations{}
  |> ToolAnnotations.title("Search Tool")
  |> ToolAnnotations.read_only_hint(true)
  |> ToolAnnotations.build()
```

Result:

```elixir
%{title: "Search Tool", readOnlyHint: true}
```

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

## Fields

| Field | Setter | Type | Required |
|---|---|---|---|
| `title` | `title/2` | string | no |
| `readOnlyHint` | `read_only_hint/2` | boolean | no |
| `destructiveHint` | `destructive_hint/2` | boolean | no |
| `idempotentHint` | `idempotent_hint/2` | boolean | no |
| `openWorldHint` | `open_world_hint/2` | boolean | no |

# `t`

```elixir
@type t() :: %OzMcp.Structs.ToolAnnotations{
  destructiveHint: boolean() | nil,
  idempotentHint: boolean() | nil,
  openWorldHint: boolean() | nil,
  readOnlyHint: boolean() | nil,
  title: String.t() | nil
}
```

# `build`

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

# `destructive_hint`

```elixir
@spec destructive_hint(t(), boolean() | nil) :: t()
```

# `idempotent_hint`

```elixir
@spec idempotent_hint(t(), boolean() | nil) :: t()
```

# `open_world_hint`

```elixir
@spec open_world_hint(t(), boolean() | nil) :: t()
```

# `read_only_hint`

```elixir
@spec read_only_hint(t(), boolean() | nil) :: t()
```

# `title`

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

---

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