Package dev.tachyonmcp.api.server.domain
Interface TextContent
- All Superinterfaces:
ContentBlock,HasMeta
A plain-text content block provided to or from an LLM.
Text is the most common content type. Optional Annotations allow the
server to hint at audience, priority, or modification time.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface dev.tachyonmcp.api.server.domain.ContentBlock
ContentBlock.Type -
Method Summary
Modifier and TypeMethodDescription@Nullable Annotationsstatic TextContent.Builderbuilder()default voidcheck()meta()Returns the optional metadata map for protocol extensions.static TextContentCreates a text content block with no metadata or annotations.static TextContentof(String text, @Nullable Annotations annotations) Creates a text content block with given annotations and no metadata.static TextContentCreates a text content block with metadata and optional annotations.text()default ContentBlock.Typetype()Returns the MCP protocol type discriminator for this content block variant.
-
Method Details
-
text
String text() -
meta
Description copied from interface:HasMetaReturns the optional metadata map for protocol extensions. -
annotations
@Nullable Annotations annotations() -
type
Description copied from interface:ContentBlockReturns the MCP protocol type discriminator for this content block variant.- Specified by:
typein interfaceContentBlock- Returns:
- the content type discriminator
-
check
@Check default void check() -
builder
-
of
Creates a text content block with no metadata or annotations. -
of
Creates a text content block with given annotations and no metadata. -
of
static TextContent of(String text, @Nullable Map<String, Object> meta, @Nullable Annotations annotations) Creates a text content block with metadata and optional annotations.
-