ToolResultContent.toMCP constructor
Implementation
factory ToolResultContent.toMCP(Map<String, Object?> map) {
return ToolResultContent(
toolUseId: map['toolUseId'] as String,
content: (map['content'] as List<dynamic>)
.map((e) => ContentBlock.toMCP(e as Map<String, Object?>))
.toList(),
structuredContent: map['structuredContent'] as Map<String, Object?>?,
isError: map['isError'] as bool?,
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,
);
}