How to use shortcuts to rename tags on the sidebar

I know that I can edit a tag in the sidebar in the app. I also believe that more than one tag cannot be selected for batch edits in the app.

I have a large number of child tags that I want to eliminate while keeping the parents. I assume that I need to do this in shortcuts.

In shortcuts I can add and remove tags to a specified note. However, I would prefer to simply change the name of a tag, the same way that I would in the app, using shortcuts. Then a few thousand (I know) edits would be feasible. I have tagged every journal page for the last 8 years with #journal/year/month/date and all these tags are useless and I would like to be rid of them leaving just #journal/year/month.

I can get a tag object in shortcuts but I think the tag name is read only. Are there any techniques to modify a tag name programmatically. Maybe a url scheme, if no shortcut action.

The url scheme comment was added without first checking. There is indeed a /rename-tag | X-Callback-URL API Actions Builder url action available and it works as expected.

I’m still curious if there is a non-url scheme solution but clearly I have a working solution now.