ClientCapabilities class

Server information (2025-03-26 compliant) What this client supports, as it advertises it.

Boolean flags for each capability plus every sub-field the protocol defines. toJson writes only what is set.

Annotations
  • @immutable

Constructors

ClientCapabilities({bool roots = false, bool rootsListChanged = false, bool sampling = false, bool samplingContext = false, bool samplingTools = false, bool elicitation = false, bool elicitationForm = false, bool elicitationUrl = false, Map<String, dynamic>? tasks, Map<String, Map<String, dynamic>>? experimental, Map<String, Map<String, dynamic>>? extensions, ClientCapabilitiesSchema? raw})
const
ClientCapabilities.fromJson(Map<String, dynamic> json)
factory

Properties

elicitation → bool
elicitation: the server may call elicitation/create.
final
elicitationDeclared → bool
Whether elicitation is declared (any elicitation flag declares it).
no setter
elicitationForm → bool
elicitation.form (2025-11-25).
final
elicitationUrl → bool
elicitation.url (2025-11-25).
final
experimental → Map<String, Map<String, dynamic>>?
experimental: non-standard capabilities.
final
extensions → Map<String, Map<String, dynamic>>?
extensions (2026-07-28): reverse-DNS id -> settings.
final
hashCode → int
The hash code for this object.
no setterinherited
raw → ClientCapabilitiesSchema?
The capabilities as received (every field, typed), when parsed. Its sub-objects and any field this class does not name are written back by toJson.
final
roots → bool
roots: the server may call roots/list.
final
rootsDeclared → bool
Whether roots are declared.
no setter
rootsListChanged → bool
roots.listChanged.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sampling → bool
sampling: the server may call sampling/createMessage.
final
samplingContext → bool
sampling.context (2025-11-25): context inclusion supported.
final
samplingDeclared → bool
Whether sampling is declared (any sampling flag declares it).
no setter
samplingTools → bool
sampling.tools (2025-11-25): tool use in sampling supported.
final
tasks → Map<String, dynamic>?
tasks (2025-11-25), as the protocol writes it.
final

Methods

hasExtension(String id) → bool
Whether this set advertises the extension id.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

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