Cisco implemented Tcl in their routers beginning with IOS release 12.0 running Tcl version 8.3.4, it empowers users to create simple or complex scripts to automate network critical on device monitoring, laborious repetitive time consuming task, in depth diagnostics whilst filtering out specific results that are actually needed to simple router usability enhancements.

Tcl is used primarily in two areas on cisco routers, directly in the Tcl interactive shell with code typed, pasted or called from a local file or remote server or through an EEM Tcl policy, the code is again stored in a local file or remote server and is executed in the routers Tcl shell and also registered in the event manager through the routers global configuration.

Head off to the Tcl developer Xchange, get the list of available commands and their documentation, have a look at their tutorial(v8.5), maybe install Tcl to your computer and of course it may be worth having a look at Cisco's documentation on the subject.

For a wealth of cisco EEM related information and examples check out the blog of Ivan Pepelnjak and of course it may be worth having a look at Cisco's documentation on the subject.