I think you're not really asking if this is soil, which requires inorganic materials ( ground rocks ) with some organic matter ( humus ), but whether this mixture is suitable medium to grow your tomatoes. There are many different types of media including those used in hydroponics ( just water alone ), flood and drain systems which use gravel, and expanded clay pellets, to traditional soil. The elements that provide the necessary growing media include support, nutrients, water and oxygen. Your mixture of coffee grounds is mostly organic matter in a form not yet available to the plants since it hasn't been transformed to humus, doesn't offer support, doesn't allow free draining so that oxygen gets to the roots, and will just clog up with stagnant water. The coffee will decompose and rot the roots. If any survive, it will be the one with the lesser amount of coffee.