Noizu.MCP.Types.ResourceContents (Noizu MCP v0.1.1)

Copy Markdown View Source

The contents of a read resource. Text resources carry :text; binary resources carry :blob (raw binary, base64-encoded on the wire).

Summary

Types

t()

@type t() :: %Noizu.MCP.Types.ResourceContents{
  blob: binary() | nil,
  meta: map() | nil,
  mime_type: String.t() | nil,
  text: String.t() | nil,
  uri: String.t()
}

Functions

blob(uri, blob, opts \\ [])

@spec blob(String.t(), binary(), keyword()) :: t()

from_map(map)

@spec from_map(map()) :: t()

text(uri, text, opts \\ [])

@spec text(String.t(), String.t(), keyword()) :: t()

to_map(contents)

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