# `ConduitMcp.Client.Prompt`
[🔗](https://github.com/nyo16/conduit_mcp/blob/v0.11.0/lib/conduit_mcp/client/prompt.ex#L1)

A prompt listed by a server (`prompts/list`).

`arguments` is the list of wire `PromptArgument` maps (string keys:
`"name"`, `"title"`, `"description"`, `"required"`), keeping only entries
that are maps with a string `"name"`. `raw` keeps the wire map untouched.
Prompt argument values sent to `prompts/get` are always strings.

# `t`

```elixir
@type t() :: %ConduitMcp.Client.Prompt{
  arguments: [map()],
  description: String.t() | nil,
  meta: map(),
  name: String.t(),
  raw: map(),
  server_id: String.t(),
  title: String.t() | nil
}
```

# `from_wire`

```elixir
@spec from_wire(String.t(), term()) ::
  {:ok, t()} | {:error, ConduitMcp.Client.Error.t()}
```

Builds a `Prompt` from a wire `Prompt` map listed by `server_id`.

`name` must be a string; otherwise the result is a `:protocol` error with
reason `:invalid_prompt`.

    iex> {:ok, prompt} =
    ...>   ConduitMcp.Client.Prompt.from_wire("docs", %{
    ...>     "name" => "summarize",
    ...>     "arguments" => [%{"name" => "topic", "required" => true}]
    ...>   })
    iex> Enum.map(prompt.arguments, & &1["name"])
    ["topic"]

---

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