diff --git a/mcp/server.go b/mcp/server.go index 08effd79..b96edbe8 100644 --- a/mcp/server.go +++ b/mcp/server.go @@ -215,7 +215,7 @@ func (s *Server) RemoveResources(uris ...string) { func() bool { return s.resources.remove(uris...) }) } -// AddResourceTemplate adds a [ResourceTemplate] to the server, or replaces on with the same URI. +// AddResourceTemplate adds a [ResourceTemplate] to the server, or replaces one with the same URI. // AddResourceTemplate panics if a URI template is invalid or not absolute (has an empty scheme). func (s *Server) AddResourceTemplate(t *ResourceTemplate, h ResourceHandler) { s.changeAndNotify(notificationResourceListChanged, &ResourceListChangedParams{}, diff --git a/mcp/shared.go b/mcp/shared.go index 54038f5f..319071f2 100644 --- a/mcp/shared.go +++ b/mcp/shared.go @@ -86,7 +86,7 @@ func defaultSendingMethodHandler[S Session](ctx context.Context, session S, meth return res, nil } -// Helper methods to avoid typed nil. +// Helper method to avoid typed nil. func orZero[T any, P *U, U any](p P) T { if p == nil { var zero T