ResourceContent class

Resource content read from an MCP server.

Unified shape that absorbs the legacy McpResource (simple-form) and the ResourceContent from mcp_skill. See REDESIGN-PLAN §3.3 Open Question 8 — resolution: adopt this merged shape.

Constructors

ResourceContent({required String uri, String? mimeType, String? text, List<int>? bytes, Map<String, dynamic>? metadata})
const

Properties

bytes List<int>?
Binary content (null when text).
final
hashCode int
The hash code for this object.
no setterinherited
isBinary bool
Whether this resource is binary.
no setter
isText bool
Whether this resource is text-based.
no setter
metadata Map<String, dynamic>?
Metadata.
final
mimeType String?
MIME type.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String?
Text content (null when binary).
final
uri String
Resource URI.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited