It’s not wrong, Tofu. Although usually it refers to something designed to fool or trick someone, there is no reason why it cannot be used in a positive way.
“During the long car journey, dad cooked up a game which kept the children entertained.”
“His sister cooked up a story which he enjoyed hearing over and over.”
b to invent something, especially in order to trick somebody[/b]
This definition isn’t good, is it? Do you that it should be “(informal) to invent something, especially in order to trick [color=red]or entertain somebody”?
I wouldn’t worry too much about that idiom. It is not very common, and you will probably never come across it again.
I always caution students from trying to learn idioms that are not used in context. Often those idiom books are full of sayings that nobody uses anymore. I would consider “cook up” to be one of those rarely used idioms.
‘Cook up’ does have that sense of ‘dreaming up’ and suggests it has been made up on the spur of the moment. We have the expression ‘a cock and bull story’, which is just such a story that doesn’t have any basis in reality. I can’t really see it in a positive way of entertaining. We have other expressions like ‘tall story’ suggesting a story that’s probably not true.