There's the MKVToolNix, mentioned in the official Matroska website, which is a package of tools, one of them is mkinfo which can be used to retrieve some information about Matroska and WebM files.
There's also the mkvalidator as mentioned by the other answers, but I couldn't find recent builds for Linux.
If you check their download page, you will find Ubuntu deb repositories. And once you add the deb repository to your sources list, you will be able to install the command line tools and/or the GUI tool as well.
Here is an example of the output you get when you use mkvinfo on a file:
$ mkvinfo 1fbf4140-3807-49f7-9f78-91bdada71a6e
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ Maximum EBML ID length: 4
|+ Maximum EBML size length: 8
|+ Document type: webm
|+ Document type version: 4
|+ Document type read version: 2
+ Segment: size unknown
|+ Segment information
| + Timestamp scale: 1000000
| + Multiplexing application: Chrome
| + Writing application: Chrome
|+ Tracks
| + Track
| + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
| + Track UID: 16615739537438539
| + Track type: audio
| + Codec ID: A_OPUS
| + Codec's private data: size 19
| + Audio track
| + Sampling frequency: 48000
| + Channels: 1
| + Bit depth: 32
|+ Cluster
Matroska page mentioning the tool: https://www.matroska.org/downloads/mkvtoolnix.html
MKVToolNix page: https://mkvtoolnix.download/