ServerCapabilities class

Server capabilities configuration for MCP 2025-03-26 protocol

Annotations
  • @immutable

Constructors

ServerCapabilities({ToolsCapability? tools, ResourcesCapability? resources, PromptsCapability? prompts, LoggingCapability? logging, CompletionsCapability? completions, SamplingCapability? sampling, RootsCapability? roots, ProgressCapability? progress})
const
ServerCapabilities.simple({bool tools = false, bool toolsListChanged = false, bool resources = false, bool resourcesListChanged = false, bool prompts = false, bool promptsListChanged = false, bool sampling = false, bool logging = false, bool completions = false, bool roots = false, bool rootsListChanged = false, bool progress = false})
Create a simple capabilities configuration with boolean flags
factory

Properties

completions CompletionsCapability?
Completions support (spec: argument autocompletion via completion/complete).
final
hasCompletions bool
no setter
hashCode int
The hash code for this object.
no setterinherited
hasLogging bool
no setter
hasProgress bool
no setter
hasPrompts bool
no setter
hasResources bool
no setter
hasRoots bool
no setter
hasSampling bool
no setter
hasTools bool
Helper getters for backward compatibility with old boolean-based API
no setter
logging LoggingCapability?
Logging support capabilities
final
progress ProgressCapability?
Progress support capabilities
final
prompts PromptsCapability?
Prompt support capabilities
final
promptsListChanged bool
no setter
resources ResourcesCapability?
Resource support capabilities
final
resourcesListChanged bool
no setter
roots RootsCapability?
Roots support capabilities
final
rootsListChanged bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sampling SamplingCapability?
Sampling support capabilities
final
tools ToolsCapability?
Tool support capabilities
final
toolsListChanged bool
no setter

Methods

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