demo_calculator_tool
Add, subtract, multiply, or divide two numbers to get an exact numeric result. Use for a single binary arithmetic operation where a precise computed value is needed.
Instructions
Add, subtract, multiply or divide two numbers and return the result as a number. Pure and stateless: no side effects, no network, no auth beyond the group's key, no rate limit of its own. Division by zero returns a tool error (isError) with a one-sentence message instead of a value. Use it when an exact arithmetic result matters; for anything beyond one binary operation, chain calls or compute in the model.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| func | Yes | operation to apply as var1 <func> var2 | |
| var1 | Yes | first operand (left-hand side); any finite number | |
| var2 | Yes | second operand (right-hand side); must be non-zero for divide |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | var1 <func> var2 |