add tool function code
add client server code