A resource listed by a server (resources/list).
raw keeps the string-keyed wire map untouched (including icons and any
future keys); the other fields are conveniences lifted from it. uri is
the server's string, never parsed or normalized here.
Summary
Functions
Builds a Resource from a wire Resource map listed by server_id.
Types
Functions
@spec from_wire(String.t(), term()) :: {:ok, t()} | {:error, ConduitMcp.Client.Error.t()}
Builds a Resource from a wire Resource map listed by server_id.
uri and name must be strings; otherwise the result is a :protocol
error with reason :invalid_resource.
iex> {:ok, res} =
...> ConduitMcp.Client.Resource.from_wire("docs", %{"uri" => "file:///a.md", "name" => "a"})
iex> res.uri
"file:///a.md"