readResource method
Read a resource from the server
Implementation
Future<ReadResourceResult> readResource(String uri) async {
if (!_initialized) {
throw McpError('Client is not initialized');
}
if (_serverCapabilities?.resources != true) {
throw McpError('Server does not support resources');
}
final response = await _sendRequest('resources/read', {'uri': uri});
return ReadResourceResult.fromJson(response);
}