MCPcopy Create free account
hub / github.com/modelcontextprotocol/go-sdk / RemoveResources

Method RemoveResources

mcp/server.go:532–534  ·  view source on GitHub ↗

RemoveResources removes the resources with the given URIs. It is not an error to remove a nonexistent resource.

(uris ...string)

Source from the content-addressed store, hash-verified

530// RemoveResources removes the resources with the given URIs.
531// It is not an error to remove a nonexistent resource.
532func (s *Server) RemoveResources(uris ...string) {
533 s.changeAndNotify(notificationResourceListChanged, func() bool { return s.resources.remove(uris...) })
534}
535
536// AddResourceTemplate adds a [ResourceTemplate] to the server, or replaces one with the same URI.
537// AddResourceTemplate panics if a URI template is invalid or not absolute (has an empty scheme).

Callers 1

TestEndToEndFunction · 0.95

Calls 2

changeAndNotifyMethod · 0.95
removeMethod · 0.80

Tested by 1

TestEndToEndFunction · 0.76