ServerCapabilities class

Server capabilities

Annotations
  • @immutable

Constructors

ServerCapabilities({bool tools = false, bool toolsListChanged = false, bool resources = false, bool resourcesListChanged = false, bool prompts = false, bool promptsListChanged = false, bool logging = false, bool sampling = false, Map<String, Map<String, dynamic>>? extensions})
Create a capabilities object with specified settings
const
ServerCapabilities.fromJson(Map<String, dynamic> json)
Create capabilities from JSON
factory

Properties

extensions → Map<String, Map<String, dynamic>>?
Extensions framework (MCP 2026-07-28). Reverse-DNS keyed extension identifiers → per-extension settings, as advertised by the server via server/discover / initialize. Additive.
final
hashCode → int
The hash code for this object.
no setteroverride
logging → bool
Logging support
final
prompts → bool
Prompt support
final
promptsListChanged → bool
Whether prompts list changes are sent as notifications
final
resources → bool
Resource support
final
resourcesListChanged → bool
Whether resources list changes are sent as notifications
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sampling → bool
Sampling support
final
tools → bool
Tool support
final
toolsListChanged → bool
Whether tools list changes are sent as notifications
final

Methods

hasExtension(String id) → bool
Whether the server advertises the extension id (reverse-DNS key), e.g. io.modelcontextprotocol/tasks.
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