How did Kid even know about the detectives gathering at the mansion in episode 219?


In episode 219 of _Detective Conan_ , "The Gathering of the Detectives!
Shinichi Kudo vs. Kaitou Kid", Kid was there in the gathering.

I am curious as to how Kid even knew about the detectives gathering at the
mansion.

Like, did he spy on people getting the letters, or did he spy Conan?

