ClientCapabilities class

Client capabilities configuration

Annotations
  • @immutable

Constructors

ClientCapabilities({bool roots = false, bool rootsListChanged = false, bool sampling = false, bool elicitation = false, Map<String, Map<String, dynamic>>? extensions})
Create a capabilities object with specified settings
const
ClientCapabilities.fromJson(Map<String, dynamic> json)
factory

Properties

elicitation bool
Elicitation support — server can request user input via elicitation/create (spec 2025-06-18+).
final
extensions Map<String, Map<String, dynamic>>?
Extensions framework (MCP 2026-07-28). Keys are reverse-DNS extension identifiers (e.g. io.modelcontextprotocol/tasks); values are per-extension settings (empty object = supported, no settings). Additive — absent/empty for peers that do not use extensions.
final
hashCode int
The hash code for this object.
no setterinherited
roots bool
Root management support — server may request roots/list and the client responds with Client.roots.
final
rootsListChanged bool
Whether roots list changes are sent as notifications
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sampling bool
Sampling support — host's LLM is reachable through this client (the server can ask for completions via sampling/createMessage).
final

Methods

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

Operators

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