Bug 1030996 - Add in tool notifications

This is a draft for feedback
Yeah. If you eventually had multiple conditions to check but still some complex middleware logic to share I'd suggest inheritance and multiple middlewares instead of one middleware with many checking functions piled into it.