Did you consider writing a small Python script for that?

... or telling the LLM to write a small python script for that and install it as a mcp or something ...