Package com.google.genkit.plugins.mcp
Class MCPResourceContent
java.lang.Object
com.google.genkit.plugins.mcp.MCPResourceContent
Represents the content of an MCP resource.
Resource content can contain multiple parts, each of which can be text or binary data.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a single part of resource content. -
Constructor Summary
ConstructorsConstructorDescriptionMCPResourceContent(String uri, List<MCPResourceContent.ContentPart> parts) Creates a new resource content. -
Method Summary
-
Constructor Details
-
MCPResourceContent
Creates a new resource content.- Parameters:
uri- the resource URIparts- the content parts
-
-
Method Details
-
getUri
Gets the resource URI.- Returns:
- the URI
-
getParts
Gets the content parts.- Returns:
- the parts
-
getText
Gets the text content if this resource has a single text part.- Returns:
- the text content, or null if not available
-