John Broom, aged 68, pleaded guilty to two counts of attempting to engage in sexual communications with a child when he appeared at Wolverhampton Magistrates Court.
The case relates to conversations between Broom, of Hartshorn Street, Bilston, and officer decoys between April 2020 and August this year.
Mr Riaz said: “Broom sent graphic messages to a decoy posing as a 12-year-old, despite the person reminding him of her age.
“He went on to ask the decoy what she was wearing, including specifically checking whether she was in her school uniform.”
Mr James Morris, mitigating, said Broom got carried away and told police that he was sorry for his actions.
The magistrates agreed to adjourn the case for reports.
He will be sentenced on November 7 when he will be sentenced at Dudley Magistrates Court.
Broom will also be required to sign the sex offenders register within three days.