You could make a relation like “requirement”, and for each item specify a “prerequisite” (e.g., the potato requires the oil, the egg requires the water, et cetera). Then, in the action definition, make it check whether “the prerequisite of the noun” is in the pot.
The answer to the simplest interpretation of your question is:
Instead of boiling something when the water is not inside the pot:
say "You need water to start boiling [the noun]."
Something includes people, so you’ll need a separate rule to prevent that, unless your game is awesome.
In general, what lux said.
Modeling cooking at this granularity could be complex. Even just heating water in a pot on a stove involves two difficult things (fire and liquids). I’d suggest doing whatever you can to simplify the model within the constraints of what’s important to your game. Possibly just have BOIL X report “You grab a pot, heat some water, and boil [the noun].”