resourcecontent

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package resourcecontent owns blob/text alternative selection for every native MCP schema version. Wire fields remain in each version's generated models.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Selection

type Selection uint8
const (
	Unspecified Selection = iota
	Blob
	Text
)

func FromObject

func FromObject(object map[string]any) (Selection, error)

FromObject preserves explicit empty alternatives during JSON round trips.

func (Selection) Resolve

func (s Selection) Resolve(blob, text string) (Selection, error)

Resolve rejects conflicting mutable fields. With no explicit alternative, nonempty text selects text and the all-empty value selects an empty blob. NewEmbeddedText or JSON decoding records explicit empty-text intent.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL