ServerCapabilities class
What a server supports, as it advertised it.
Boolean flags for each capability and sub-field, plus raw: the JSON exactly as received, so a field this class does not name (a newer revision's, an extension's) is still there.
- Annotations
-
- @immutable
Constructors
-
ServerCapabilities({bool tools = false, bool toolsListChanged = false, bool resources = false, bool resourcesSubscribe = false, bool resourcesListChanged = false, bool prompts = false, bool promptsListChanged = false, bool logging = false, bool completions = false, Map<
String, dynamic> ? tasks, Map<String, Map< ? experimental, Map<String, dynamic> >String, Map< ? extensions, ServerCapabilitiesSchema? raw})String, dynamic> > -
const
-
ServerCapabilities.fromJson(Map<
String, dynamic> json) -
factory
Properties
- completions → bool
-
completions:completion/completeis supported.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 setteroverride
- logging → bool
-
final
- prompts → bool
-
final
- promptsListChanged → bool
-
final
- raw → ServerCapabilitiesSchema?
-
The capabilities as received (every field, typed), when parsed.
final
- resources → bool
-
final
- resourcesListChanged → bool
-
final
- resourcesSubscribe → bool
-
resources.subscribe:resources/subscribeis supported.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
tasks
→ Map<
String, dynamic> ? -
tasks(2025-11-25), as the protocol writes it.final - tools → bool
-
final
- toolsListChanged → bool
-
final
Methods
-
hasExtension(
String id) → bool -
Whether the server 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.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override