onResourceContentUpdated method
Register a handler for resource update notifications with content
The handler will be called with:
uri - The URI of the updated resource
content - The new content of the resource
Implementation
void onResourceContentUpdated(
Function(String uri, ResourceContentInfo content) handler,
) {
onNotification(McpProtocol.methodResourceUpdated, (params) {
final uri = params['uri'] as String;
final contentData = params['content'] as Map<String, dynamic>;
final content = ResourceContentInfo.fromJson(contentData);
handler(uri, content);
});
}