Z39.50 is a protocol used mostly in library software. References here on the wiki are:
http://en.wikipedia.org/wiki/Z39.50
Now, is anybody aware of a z39.50 server written in Tcl? There is one in Perl, called SimpleServer.
There was a project years ago that built a server in tcl
http://cordis.europa.eu/libraries/en/projects/europaga.html
The yaz (Indexdata) people, particularly Adam Dickmeiss wrote the code.
www.indexdata.dk
They also have/had IRTcl client that spoke to z39.50 servers
http://ftp.indexdata.dk/pub/irtcl/