Actually, no. That does not create a toggle. You would have to type that each time to take screen shots with UI.
I believe the toggle would be /screenshot_UI_on but I cannot confirm that at the moment.
You can also create a bind for this using this format /bind <key> "toggle screenshot_UI_on"
Yep, you're right. My bad. /screenshot_ui and /screenshot_ui_jpg seem to do the same thing. Neither one toggles, and /screenshot_ui already makes a .jpg. I've never messed with these before, so my experience is limited to, well, this.