Package dev.tachyonmcp.api.server.domain
Interface EmbeddedResource
- All Superinterfaces:
ContentBlock,HasMeta
A complete resource embedded inline within a tool result, prompt, or other content.
The embedded resource contains both the URI and the actual content
(TextResourceContents or BlobResourceContents), allowing the
server to attach resource data directly without requiring a separate read round-trip.
-
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 EmbeddedResource.Builderbuilder()meta()Returns the optional metadata map for protocol extensions.static EmbeddedResourceof(ResourceContents resource) Creates an embedded resource with no metadata or annotations.static EmbeddedResourceof(ResourceContents resource, @Nullable Annotations annotations) Creates an embedded resource with given annotations and no metadata.static EmbeddedResourceof(ResourceContents resource, @Nullable Annotations annotations, @Nullable Map<String, Object> meta) Creates an embedded resource with metadata and optional annotations.resource()default ContentBlock.Typetype()Returns the MCP protocol type discriminator for this content block variant.
-
Method Details
-
resource
ResourceContents resource() -
annotations
@Nullable Annotations annotations() -
meta
Description copied from interface:HasMetaReturns the optional metadata map for protocol extensions. -
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
-
builder
-
of
Creates an embedded resource with no metadata or annotations. -
of
Creates an embedded resource with given annotations and no metadata. -
of
static EmbeddedResource of(ResourceContents resource, @Nullable Annotations annotations, @Nullable Map<String, Object> meta) Creates an embedded resource with metadata and optional annotations.
-