Result class

Generic MCP result that may carry arbitrary extra fields.

Every result produced by a server implementing protocol version 2026-07-28 MUST include resultType on the wire; it defaults to 'complete' for ergonomics. A client talking to an older server that omits the field MUST treat its absence as 'complete'.

Inheritance

Constructors

Result({ResultMetaObject? $meta, String resultType = 'complete', Map<String, Object?>? unknown})
Result.toMCP(Map<String, Object?> map)
factory

Properties

$meta ResultMetaObject?
Optional _meta object.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
resultType String
Indicates how the client should parse this result.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unknown Map<String, Object?>?
Any additional unknown fields returned by the server.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, Object?>
override
toString() String
A string representation of this object.
inherited

Operators

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