You'll also need to include a message. The reason why pbAddToParty isn't used is because it gives the name of the Pokémon being added, which you don't want to show because it's an Egg and the player shouldn't know the species.
Frankly, you shouldn't have a situation where the game wants to give an Egg to the player when they have a full party. It's messy, and rather uncaring if you send an Egg straight off to storage.
To give the player an Egg when they have a free space in their party, simply use pbGenerateEgg(PBSpecies::TOGEPI). You'll still need to add in your own message. The Wiki has more information about Eggs (and about giving Pokémon too).