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

Helper module used to build `BooleanSchema` structure: a yes/no field of
an elicitation form.

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

## Short example:

```elixir
%BooleanSchema{}
  |> BooleanSchema.title("Subscribe")
  |> BooleanSchema.default(true)
  |> BooleanSchema.build()
```

Result:

```elixir
%{type: "boolean", title: "Subscribe", default: true}
```

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

## Fields

| Field | Setter | Type | Required |
|---|---|---|---|
| `title` | `title/2` | string | no |
| `description` | `description/2` | string | no |
| `default` | `default/2` | boolean | no |

# `t`

```elixir
@type t() :: %OzMcp.Structs.BooleanSchema{
  default: boolean() | nil,
  description: String.t() | nil,
  title: String.t() | nil
}
```

# `build`

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

# `default`

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

# `description`

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

# `title`

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

---

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