This example script uses the Anthropics API to decide whether it can answer the input or whether it needs to use the Tomorrow.io weather API to fetch and display the current weather for a given location. You will see the workings of the tool when running the preset message or you can create your own.
You will need your own API keys for Anthropic and Tomorrow.io and these must be stored in a .env file in your project directory. The script will automatically call these.