Minecraft wiki entry for clear, associated text: Specifies the player(s) whose items are cleared. If not specified, defaults to the player who executes the command.
Must be a player name, a target selector or a UUID‌[Java Edition only]. And the target selector must be of player type.