removeRoot method

void removeRoot(
  1. String uri
)

Remove a server-side cached root entry (see addRoot for the direction caveat).

Implementation

void removeRoot(String uri) {
  if (!_roots.any((r) => r.uri == uri)) {
    throw McpError('Root with URI "$uri" does not exist');
  }
  _roots.removeWhere((r) => r.uri == uri);
}