ServerCapabilities class
What this server advertises in capabilities (initialize result and
server/discover). Only the keys the schema's ServerCapabilities
defines are sent.
- Annotations
-
- @immutable
Constructors
-
ServerCapabilities({ToolsCapability? tools, ResourcesCapability? resources, PromptsCapability? prompts, LoggingCapability? logging, CompletionsCapability? completions, Map<
String, Map< ? experimental, Map<String, dynamic> >String, dynamic> ? tasks, Map<String, Map< ? extensions})String, dynamic> > -
const
- ServerCapabilities.simple({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})
-
A capability set from boolean flags.
factory
Properties
- completions → CompletionsCapability?
-
Argument autocompletion (
completion/complete).final -
experimental
→ Map<
String, Map< ?String, dynamic> > -
Non-standard experimental features, by name.
final
-
extensions
→ Map<
String, Map< ?String, dynamic> > -
Extensions framework (MCP 2026-07-28). Keys are reverse-DNS extension
identifiers (e.g.
io.modelcontextprotocol/tasks, following the_metakey naming rules with a mandatory prefix); values are per-extension settings objects (an empty object = supported with no settings).final - hasCompletions → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasLogging → bool
-
no setter
- hasPrompts → bool
-
no setter
- hasResources → bool
-
no setter
- hasTools → bool
-
no setter
- logging → LoggingCapability?
-
Log message notifications.
final
- prompts → PromptsCapability?
-
Prompts (
prompts/list,prompts/get).final - promptsListChanged → bool
-
no setter
- resources → ResourcesCapability?
-
Resources (
resources/list,resources/read, …).final - resourcesListChanged → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
tasks
→ Map<
String, dynamic> ? -
Task-augmented requests (2025-11-25 core tasks), as the schema's
ServerCapabilities.tasksobject (list,cancel,requests).final - tools → ToolsCapability?
-
Tools (
tools/list,tools/call).final - toolsListChanged → bool
-
no setter
Methods
-
hasExtension(
String id) → bool -
Whether this capability set 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.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited