Toyota mr2

i have a 91 toyota mr2 that i haven’t driven for a few years. i recently decided to start using it again. it has 222,000 miles on it. i would occasionally start the car and let it run for a while but the last time i tried to start it, it wouldn’t start. a toyota mechanic told me it needed an air idle control valve. i had that part installed plus had a major tune up, and a fuel pump installed. after i drive it for a short time and then stop for a light or something else, the motor will race and then slow down. this continues till the car is moving again. it never stalls. the next thing the toyota mechanic said it could be is the egr valve or the egr modulator. if anyone knows the answer to this problem, please help.

Check the throttle position switch. I believe that on that car it was just an on/off switch to signal the ECM to take over the idle.