That could be caused by a sticky IAC (Idle Air Control) valve which is what gives the engine all of the air when the engine is at idle and you are not stepping on the accelerator pedal.
If stepping down on the gas makes the problem go away, that is more reason to suspect the IAC is sticky/dirty and needs to be cleaned to cure the problem.
If stepping down on the gas does not help, the problem is not with the IAC.
If you suspect the IAC is at fault because stepping on the gas cures the problem, the cure is to clean the IAC with aerosol throttle body cleaner. It may be possible to clean it by simply cleaning the throttle body with the cleaner while the engine is running. How to do this is descrbed on the can but it basically involves starting the engine, holding the rpms up a tad with the throttle lever, and spraying the cleaner into the throttle body. Making sure to get some into the Idle Air Control air passage slot just above the butterfly valve shown in the below illustration.
That slot is where the air passes through and into the IAC which is then metered to the engine when it is idling.
This illustration is for the 4.0L engine but it should be very close to what is on your 2.5L.