OzMcp.Structs.Icon (OzMcp v0.9.0)

Copy Markdown View Source

Helper module used to build Icon structure.

(MCP protocol: 2025-11-25)

Short example:

%Icon{}
  |> Icon.src("https://img.com/icon.png")
  |> Icon.mime_type("image/png")
  |> Icon.sizes(["16x16"])
  |> Icon.theme(:dark)
  |> Icon.build()

Result:

%{
  mimeType: "image/png",
  theme: :dark,
  src: "https://img.com/icon.png",
  sizes: ["16x16"]
}

Specification: Icon

Fields

FieldSetterTypeRequired
srcsrc/2stringyes
mimeTypemime_type/2stringno
sizessizes/2listno
themetheme/2theme()no

Summary

Types

t()

@type t() :: %OzMcp.Structs.Icon{
  mimeType: String.t() | nil,
  sizes: list() | nil,
  src: String.t(),
  theme: theme()
}

theme()

@type theme() :: :light | :dark | nil

Functions

build(struct)

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

mime_type(struct, value)

@spec mime_type(t(), String.t() | nil) :: t()

sizes(struct, value)

@spec sizes(t(), list() | nil) :: t()

src(struct, value)

@spec src(t(), String.t()) :: t()

theme(struct, value)

@spec theme(t(), theme()) :: t()