add tool calling support to run env (#766)