I recall a young adult chapter book from my youth (late 1970s-early 1980s) about a boy with a magic pencil. It is used like a regular pencil, but it might have been blue lead. Like a regular pencil, it needs to be sharpened, and gets slightly smaller each time. I can’t recall the things he made or did with it. Some dramatic emergency with the last bit of pencil. Apologies but that’s all I remember.