Cooking with a knife is a bad idea, cooking with a sword is a slightly better idea, as it has enough length to reduce the conducted heat similar to using a solid metal pot or pan to cook with.
Its not a particularly good idea, as it’d be pretty useless for fighting with after you used it for cooking a few things, the heat in addition to all the things that come off of cooking meat would degrade the blade.
Also, AFAIK you can already cut up a piece of two-by-four into a pointy stick or skewers to cook with.
'a’ctivate your knife instead of using the craft menu.
Edit: Number ‘3’ “Carve Wood”