# `Urchin.Resource`
[🔗](https://github.com/urth-inc/urchin/blob/v0.4.0/lib/urchin/resource.ex#L1)

A resource definition advertised via `resources/list`.

Mirrors the `Resource` type from the MCP schema.

# `t`

```elixir
@type t() :: %Urchin.Resource{
  annotations: map() | nil,
  description: String.t() | nil,
  icons: [map()] | nil,
  meta: map() | nil,
  mime_type: String.t() | nil,
  name: String.t(),
  size: non_neg_integer() | nil,
  title: String.t() | nil,
  uri: String.t()
}
```

# `new`

```elixir
@spec new(keyword() | map()) :: t()
```

Builds a resource from a keyword list or map of attributes.

# `to_map`

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

Serializes the resource to its JSON-RPC wire shape.

---

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