describe method
Shared server-description assembly reused by the handshake initialize
result and the stateless server/discover result (2026-07-28), so the
two surfaces advertise the SAME serverInfo + capabilities object.
Returns serverInfo (Implementation: name+version, plus the optional
2025-11-25 description) and capabilities (ServerCapabilities).
instructions is intentionally NOT included here — it is a
DiscoverResult-only field surfaced by _handleDiscover.
Implementation
Map<String, dynamic> describe() {
return <String, dynamic>{
'serverInfo': <String, dynamic>{
'name': name,
'version': version,
// Spec 2025-11-25: optional Implementation.description.
if (description != null) 'description': description,
},
'capabilities': capabilities.toJson(),
};
}