protocolVersion property

ProtocolVersion? get protocolVersion

The version of the Model Context Protocol that the server wants to use.

This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect.

May be null if the version is not recognized.

Implementation

ProtocolVersion? get protocolVersion =>
    ProtocolVersion.tryParse(_value['protocolVersion'] as String);
set protocolVersion (ProtocolVersion? value)

Sets the protocol version, by default this is set for you, but you can override it to a specific version if desired.

While this API is typed as nullable, null is not an allowed value.

Implementation

set protocolVersion(ProtocolVersion? value) {
  assert(value != null);
  _value['protocolVersion'] = value!.versionString;
}