In this guide you will build your first Tool: a simple function that queries the weather for a city and returns the temperature.
Create a new Tool
In the left panel of Brain Studio, go to the Tools tab and click to create a new Tool. Assign the name: Check Weather.
Drag an API node
On the canvas, drag an API node from the nodes panel. In the URL tab, enter:Under Variables, select or create an environment variable for your API key (mark it as secret if it contains credentials).
url.txt
Configure the inputs
In the Tool configuration, add an input:
- Name:
city - Type:
string - Required: Yes
{{$input.city}}).Configure the outputs
Define what information the Tool will return. In the outputs configuration, map:
temperature: Extract the value from the API responsedescription: Extract the weather description
Test your Tool
Use the testing functionality and enter a sample value, such as “Madrid”. Verify that the response is correct and that the outputs are mapped properly.
city input.