Showing local tasks in toolbar with hook_toolbar: caching problem
"The toolbar is a container for administrative and site-global interactive components."

https://api.drupal.org/api/drupal/core!modules!toolbar!toolbar.api.php/function/hook_toolbar/8.2.x

That would indicate that the toolbar is not the solution you are looking for as the more contextual tabs are not site global but page specific.