If you're talking about thread inserts like Helicoils and such, you don't need to do what you're asking, as the thread in pitch and the remove tool pitch are the same. If you're talking about something completely different, you could write a subroutine like below.
We'll leave out the fact for now that you'd likely have to do the entire process of tapping and inserting starting with a spindle orient (M19) on each hole. It's slightly possible you could get away without on the inserting with the tension compression holder. That is... with a lot of luck.
Let's use 20 threads in and 18 out. Four holes in a line. Threading in about 1/2" deep. Using a tension compression holder for your tool. This is generic Fanuc G codes. Not sure exactly what your Tosnuc control uses.
T2M6 (THREAD INSERT TOOL)
G17G20G40G49G54G80G90G98
M00 (LOAD INSERT)
G0X1.Y1.
G43Z0.1H2S300M3
M98P20
X2.
M98P20
X3.
M98P20
X4.
M98P20
G53Z0.Y0.
M30
O20 (THREAD INSERT SUBROUTINE)
G0Z0.1S300M3
G4P500
G1Z-0.425F15.
M5
G4P500
S306M4Z0.1F17. (May need to experiment and possibly put this info on two lines. Here is where the tension compression holder is going to come in handy.)
G0Z5.M5
M00 (LOAD INSERT)
M99
You'd have to experiment with the depth and dwells depending on how fast your spindle stops and starts. May be able to skip the M5 in some spindles. (Like built in type.)
But really I think you have nothing to worry about. (See first sentence)