I wrote a thing similar to what you describe a year ago or so. It is a plugin for simonw's llm tool:
https://github.com/mlang/llm-mpd
It isn't quite reading your email yet, but should be easy to get there.