Utilities
Small, exact tools for the things models get wrong when they do them in their head: today's date, arithmetic and units.
| Tool | What it does |
|---|---|
current_time | Returns the current date and time, in UTC or any IANA timezone such as Asia/Kolkata. |
calculate | Evaluates a maths expression safely โ arithmetic, powers and functions such as sqrt, log, round, factorial. |
convert_units | Converts between units of length, mass, temperature, time, data size, speed, volume and area. |
current_time
Returns the current date and time, in UTC or any IANA timezone such as Asia/Kolkata.
How an agent gets it. Declare it in the agent's tools: list.
Arguments
| Argument | Type | Required | Meaning |
|---|---|---|---|
timezone | string | IANA timezone name (e.g. 'Europe/London'). Defaults to UTC. |
calculate
Evaluates a maths expression safely โ arithmetic, powers and functions such as sqrt, log, round, factorial.
How an agent gets it. Declare it in the agent's tools: list.
Arguments
| Argument | Type | Required | Meaning |
|---|---|---|---|
expression | string | yes | e.g. '(1234*19)/7', 'sqrt(2)+log(100,10)', 'factorial(8)'. |
convert_units
Converts between units of length, mass, temperature, time, data size, speed, volume and area.
How an agent gets it. Declare it in the agent's tools: list.
Arguments
| Argument | Type | Required | Meaning |
|---|---|---|---|
value | number | yes | |
from_unit | string | yes | e.g. 'km', 'C', 'GB', 'lb'. |
to_unit | string | yes | e.g. 'mi', 'F', 'MB', 'kg'. |