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

Helper module used to build the params of an `elicitation/create` request
in URL mode: the user is sent to a web page, the data never passes
through the client.

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

`url` must be an absolute `http` or `https` URL without credentials
(`https://user:pass@host/` is rejected: clients show the URL to the user). `elicitationId`
identifies the interaction (the server sends
`notifications/elicitation/complete` with it).

## Short example:

```elixir
%ElicitRequestURLParams{}
  |> ElicitRequestURLParams.message("Authorize the access")
  |> ElicitRequestURLParams.url("https://example.com/authorize")
  |> ElicitRequestURLParams.elicitation_id("e-1")
  |> ElicitRequestURLParams.build()
```

Result:

```elixir
%{
  mode: "url",
  message: "Authorize the access",
  url: "https://example.com/authorize",
  elicitationId: "e-1"
}
```

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

## Fields

| Field | Setter | Type | Required |
|---|---|---|---|
| `message` | `message/2` | string | yes |
| `url` | `url/2` | string | yes |
| `elicitationId` | `elicitation_id/2` | string | yes |
| `_meta` | `_meta/2` | map | no |
| `task` | `task/2` | `t:OzMcp.Structs.TaskMetadata.t/0` | no |

# `t`

```elixir
@type t() :: %OzMcp.Structs.ElicitRequestURLParams{
  _meta: map() | nil,
  elicitationId: String.t(),
  message: String.t(),
  task: OzMcp.Structs.TaskMetadata.t() | nil,
  url: String.t()
}
```

# `build`

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

# `elicitation_id`

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

# `message`

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

# `task`

```elixir
@spec task(t(), OzMcp.Structs.TaskMetadata.t() | nil) :: t()
```

# `url`

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

---

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