package server

import (
	
	

	
)

var (
	// ErrNoClientSession is returned when there is no active client session in the context
	ErrNoClientSession = errors.New("no active client session")
	// ErrRootsNotSupported is returned when the session does not support roots
	ErrRootsNotSupported = errors.New("session does not support roots")
)

// RequestRoots sends an list roots request to the client.
// The client must have declared roots capability during initialization.
// The session must implement SessionWithRoots to support this operation.
func ( *MCPServer) ( context.Context,  mcp.ListRootsRequest) (*mcp.ListRootsResult, error) {
	 := ClientSessionFromContext()
	if  == nil {
		return nil, ErrNoClientSession
	}

	// Check if the session supports roots requests
	if ,  := .(SessionWithRoots);  {
		return .ListRoots(, )
	}

	return nil, ErrRootsNotSupported
}