You could try using the "Same Page" tool. Go through the questions with your players as a whole and come to a consensus on what type of game you want to play. Keep in mind the tool is not a survey, but is meant to be gone through as a group and finding answers to each question in the tool is important to find the sweet spot for your particular group.
Ultimately, you need to have a candid discussion with your group about what they are looking to get out of the game. Sometimes people just want to come and hang out with their friends for a few hours and don't otherwise care. Some people are really into their characters and want to role-play everything, while others just like to watch their numbers get bigger as their characters increase in power. In my experience, disparate groups with wildly varying expectations (or very few or no expectations) tend to veer towards the dynamic that occurs between the GM and the most "powerful" player. In other words, people with big personality who tend to take control (even when they don't need to) tend to steer the group dynamic.
It can be difficult to deal with this, especially when you as GM may want a more RPG-heavy story while your "leader" player just wants to power game his way through every encounter (of course the same thing happens no matter what the difference is -- this just happens to be an example from my own experience). Other players will tend to follow the player leader in those cases, and you might find yourself running a different game than the one you thought you were running.
Don't forget that you, as GM, are also playing the game, and your enjoyment also matters. If you aren't having fun because your players don't want to play the same way you do, then you may need to mix it up. How you resolve this problem isn't always easy -- it might even involve dropping your group or players from your group. It could also mean simply adjusting your own expectations so that you aren't let down when the gameplay doesn't go the way you want it to. This has been the best way to deal with these types of situations in my own experience.
Yes, it may cast spells. (Usually)
There is no text stating the creature is incapable of casting spells, with the exception of the Chain (which some DMs may rule prevents somatic and material spells due to being restrained, although note this is not RAW), and Slumber (which causes the target to sleep, being incapacitated)
You create a magical restraint to hold a creature that you can see within range. The target must succeed on a Wisdom saving throw or be bound by the spell; if it succeeds, it is immune to this spell if you cast it again. While affected by this spell, the creature doesn’t need to breathe, eat, or drink, and it doesn’t age. Divination spells can’t locate or perceive the target.
For the Gem containment:
Minimus Containment. The target shrinks to a height of 1 inch and is imprisoned inside a gemstone or similar object. Light can pass through the gemstone normally (allowing the target to see out and other creatures to see in), but nothing else can pass through, even by means of teleportation or planar travel. The gemstone can’t be cut or broken while the spell remains in effect.
Emphasis mine. Note the creature is aware, but nothing can pass in or out of the gem prison, including planar transport. This would include most spell effects, although there could be an argument made for very specific spells, such as Telepathy, or as mentioned in another answer, light based spells.
Additionally, in all cases but Slumber (and maybe Chains depending on DM), if the caster is powerful enough to cast spells of 9th level, and has Dispel Magic prepared, they would be capable of freeing themselves from the prison by casting Dispel Magic as a ninth level spell at their prison.
Note: In all cases, planar travel and teleportation is restricted.
Finally, which spells could potentially affect the prison or outside world depends on the prison chosen, and your DMs judgement.
Best Answer
D&D 5e doesn't have a one-stop-shop for this
Starting from finding a person, the relevant player options tools (ie. spells etc.) are:
Detect magic† which will tell that a spell is affecting Mario, and that it is an abjuration spell.
Identify† can tell you that the spell affecting Mario is an imprisonment spell:‡
There isn't anything in identify which tells you what mode the spell is in, so adding that would be DM allowance (which you may well want to do, to get the game to move forwards).
Knowing how a given spell works and that there might be a given condition for breaking it might require an Intelligence (Arcana) check
Once you know there's an imprisonment spell and it is breakable by some unknown condition, you basically need to obtain information which has been lost as a result of time. There's no end to the methods by which one can obtain this, but starting a short-list:
If the story lives on, an Intelligence (History) check may be sufficient
If the story is recorded somewhere they can go there and find it. (This can very easily be a adventure hook for a dungeon or similar)
Then there are spells for obtaining information: legend lore† is probably the best bet, as it gives information about any legendary items, places, or persons.
†: You (or your DM) are going to have to decide exactly how the imprisonment line:
interacts with these Divination school spells which are finding out things about the target, but does not try to find it, or see it for you. Assuming you want the players to solve this it should be fairly easy to make it work.
‡: Note that identify requires you to touch the creature, which might be difficult with some forms of imprisonment. If they're just asleep somewhere this shouldn't be a problem.