TextContent.toMCP constructor

TextContent.toMCP(
  1. Map<String, Object?> map
)

Implementation

factory TextContent.toMCP(Map<String, Object?> map) {
  return TextContent(
    text: map['text'] as String,
    mimeType: map['mimeType'] as String,
    annotations: map['annotations'] != null
        ? Annotations.toMCP(map['annotations'] as Map<String, Object?>)
        : null,
    $meta: map['_meta'] != null
        ? MetaObject.toMCP(map['_meta'] as Map<String, Object?>)
        : null,
  );
}