Ask for a tool input in the proper unit

Keep action verbs and their objects together. · 164 words

Read the tool's input specification first. A weather tool might accept temperature_c, not '77 degrees outside.' Convert the source value to the required unit before calling it. For example, 'A trailhead is 77 degrees F. The forecast tool requires temperature_c. Convert to Celsius, round to one decimal place, then call it with 25.0.' The conversion (77 - 32) times 5/9 equals 25.0 C. The checkable input is 25.0 in temperature_c, not '77 degrees F.' Naming both units makes the work verifiable.

A second tool uses meters for distance. If a route is 5 km and the map tool requires distance_m, prompt: 'Convert 5 km to meters and give the number for distance_m.' The expected input is 5000 because 1 km equals 1000 m. Never leave the unit ambiguous; state the source and required units. If the source says 3 miles, the model must convert rather than send 3 and hope the tool guesses. For the running case, the check is direct: distance_m receives 5000.

Check your recall

What values should be entered for 77 degrees F and 5 km when the tools require Celsius and meters?

Check your answer

Enter 25.0 in temperature_c for 77 degrees F, and enter 5000 in distance_m for 5 km.

Sources and credits

Original KeyTouch lesson. Background reading · Microsoft · Generative AI for Beginners.