Ryan Protheroe, 34, was spotted by police, in an unmarked car, who were observing the area near a rugby club on May 27 this year.
They saw people coming and going, as well as Protheroe speaking on his telephone, Shrewsbury Crown Court heard on Thursday.
When the officers approached Protheroe he became agitated, and when they went to restrain him he threw away a package that was quickly found to contain 30 wraps of heroin and crack cocaine as well as a plastic toy egg.
The egg contained even more drugs.
In total the estimated value of the drugs was £580 in crack cocaine and £520 in heroin.
Protheroe, of Shrewsbury Street in Prees, also had two 'burner' mobile phones and £250 in cash on his person, prosecutor Ms Samantha Powis told the court.
The phone activity logs showed "extensive traffic consistent with commercial dealing", she said.
Representing Protheroe, Mr Danny Smith told the court that the defendant has been "open about his offending", having pleaded guilty in July.
He said that Protheroe was vulnerable with emotional issues, finding change "unbearable", and was dealing drugs to pay off debts accrued through his own "out-of-control" cannabis habit.
Having heard all the evidence, Recorder James Smith handed down a sentence of three years.
The severity of the sentence was in part due to the defendant's criminal record, which includes convictions for production, and possession with intent, of class B drugs.