Of the elements within Portal, the Companion Cube likely has the least amount of mechanics, and the mechanics it does have are extremely simplistic. However, its mechanics also tap into some of the most basic mechanics of all games: being using a tool, and using that tool to solve a puzzle.
Using the Companion Cube, or any of the cubes or other tools Portal gives the player, is about using one's brain to solve a puzzle. The goal is to make the player think, but not to force the player to think for so long and so hard that it becomes near impossible. Books are great for the thinking things trope, especially mystery novels, because one can be entertained by thinking about the answer to the mystery – just like how one is entertained by the trial and error that comes with using the tools.
Obviously the best author to look at for literature about thinking and solving is Sir Arthur Conan Doyle, whose Sherlock Holmes series is considered a major milestone in crime fiction. One of his most popular stories is Hounds of Baskerville, which, unlike his first A Study in Scarlet, can be figured out by a reader while reading.
The second book is one that many have read in middle school, and continues to be read for the very good reason of it being excellent. The Westing Game is about a group of people attempting to solve a puzzle left in the will of a recently deceased man. Following along with the movement of the puzzles is something that is enjoyable both the first time, and every time after. The great part of the book, too, is that the personalities of all the characters keep the reader invested not only in the mystery, but in the characters themselves getting to the end of the mystery.
The Companion Cube, like most usable objects in games, is used as a tool, in this particular case for solving puzzles. The way humans advance is through the creation and use of tools. Just about every one of our creations is a tool for something, though some tools are more useful than others – for instance, I think we’d all agree that aqueducts are more useful than, say, a lemon zester.
In entertainment, though, the focus is usually not on tools, but rather on people. Obviously this is not always true, especially if we look at several types of reality television, such as Mythbusters or even Survivor. However, literature is something that focuses more on mentality or the human condition than on the mundane task of just using things. As with everything, though, there are exceptions.
I preface this saying that many comic books make tools a very big deal. Many superheroes primarily gain their powers, or maintain their powers, via a few or many important tools. Perhaps, though, the most famous superhero, with the greatest amount of “toys,” is Batman from the Batman comics. Batman practically is Batman simply because he rich enough to make a lot of powerful gadgets. Bruce Wayne, himself, isn’t particularly impressive without several metric tons of objects. The question to ask, though, is: are all these tools required? Portal gives the player very few tools, but is very successful. Is this just a matter of genre or size, or a good rule of thumb all around? In games in it sometimes good to have as many gadgets as a super hero like Batman, or are games just too different a beast from comics? Beginning to read the Batman comics is certainly a massive endeavor, so here are some resources to help you begin:
Holes is not a graphic novel, and the use of “tools” is perhaps not as explicit, however if you’re looking for a novel to get into to thinking about how tools may impact one’s ability to survive, or do mundane tasks, it’s excellent. The obvious tool to examine here is a shovel for digging; this would be the mundane task. However, it’s also important to look at when Stanley, or any other character, has a lack of tools. How does this lack affect their lives? How does it make their journey harder, or maybe even easier? Portal takes away the tool of a reasonable way to move across space (such as a bulldozer), and replaces it with extremely primitive tools, such as a basic cube, and says “Figure it out.” How do the characters in Holes figure out their situation?