implement the tools api