DiscoverResult class
Result of a server/discover call (2026-07-28 stateless core).
Mirrors the draft schema DiscoverResult (extends CacheableResult): the
server's supported protocol versions, its capabilities, optional
natural-language instructions, and the cache hints (ttlMs/cacheScope).
Constructors
-
DiscoverResult({required List<
String> supportedVersions, required ServerCapabilities capabilities, String? instructions, int? ttlMs, String? cacheScope, Map<String, dynamic> ? serverInfo}) -
const
Properties
- cacheScope → String?
-
Cache scope hint (
"public"/"private"), if present.final - capabilities → ServerCapabilities
-
The server's advertised capabilities.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- instructions → String?
-
Optional natural-language guidance describing the server (LLM
system-prompt hint).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
serverInfo
→ Map<
String, dynamic> ? -
Self-reported server software identity from the result
_meta(io.modelcontextprotocol/serverInfo), if present.final -
supportedVersions
→ List<
String> -
Protocol versions the server supports; the client picks one for
subsequent requests.
final
- ttlMs → int?
-
Cache TTL hint in milliseconds (
CacheableResult.ttlMs), if present.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