toJson method

Map<String, Object?> toJson()

Serializes to the format consumed by the MCP server.

Implementation

Map<String, Object?> toJson() => <String, Object?>{
  'title': title.toJson(),
  'code': code,
  if (description != null) 'description': description!.toJson(),
};