Calculator Skill
Use this skill for exact arithmetic and percentage tasks.
Workflow
- Prefer one
call_skill_tool call with tool_name set to evaluate_expression when the task can be represented as one arithmetic expression.
- For totals followed by discounts, markups, taxes, or fixed reductions, fold the full final arithmetic into one expression whenever the condition is clear from the problem statement.
- If a condition must be verified numerically first, use at most two expression calls: one for the condition value and one for the final result.
- Use
calculate only when a single binary operation is clearer than a full expression.
- Use
percentage only when the user asks specifically for percent-of, percentage change, or applying a percentage increase/decrease and a single expression would be less clear.
- Before calling
evaluate_expression, convert the calculation into a pure numeric expression with ASCII operators. Remove units, natural-language notes, labels, thousands separators, and non-standard operators such as × or ÷.
- Do not calculate mentally when the user expects an exact result.
- In the final answer, include a concise summary of the calculation process and the result.
- Mention rounding when a precision value affects the displayed result.
Tool Usage
evaluate_expression accepts:
expression: a restricted arithmetic expression using numbers, parentheses, +, -, *, /, %, and ^.
precision: optional decimal places from 0 to 12.
Use decimal percentages inside expressions. For example, use 0.85 for an 85 percent multiplier and 0.15 for a 15 percent decrease.
Example for a grocery total with a fixed reduction and member discount:
expression: (9.5*10 + 4.8*15 + 15*5 - 30) * 0.85
precision: 2
calculate accepts:
operation: add, subtract, multiply, divide, power, or mod.
left: left operand.
right: right operand.
precision: optional decimal places from 0 to 12.
percentage accepts:
operation: percent_of, change, apply_increase, or apply_decrease.
value: base value for percent_of, apply_increase, and apply_decrease.
percent: percentage value, for example 15 means 15 percent.
from: original value for change.
to: new value for change.
precision: optional decimal places from 0 to 12.
1---2name: calculator3description: Perform deterministic arithmetic, percent-based math, and change-rate math.4---56# Calculator Skill78Use this skill for exact arithmetic and percentage tasks.910## Workflow11121. Prefer one `call_skill_tool` call with `tool_name` set to `evaluate_expression` when the task can be represented as one arithmetic expression.132. For totals followed by discounts, markups, taxes, or fixed reductions, fold the full final arithmetic into one expression whenever the condition is clear from the problem statement.143. If a condition must be verified numerically first, use at most two expression calls: one for the condition value and one for the final result.154. Use `calculate` only when a single binary operation is clearer than a full expression.165. Use `percentage` only when the user asks specifically for percent-of, percentage change, or applying a percentage increase/decrease and a single expression would be less clear.176. Before calling `evaluate_expression`, convert the calculation into a pure numeric expression with ASCII operators. Remove units, natural-language notes, labels, thousands separators, and non-standard operators such as `×` or `÷`.187. Do not calculate mentally when the user expects an exact result.198. In the final answer, include a concise summary of the calculation process and the result.209. Mention rounding when a precision value affects the displayed result.2122## Tool Usage2324`evaluate_expression` accepts:2526- `expression`: a restricted arithmetic expression using numbers, parentheses, `+`, `-`, `*`, `/`, `%`, and `^`.27- `precision`: optional decimal places from 0 to 12.2829Use decimal percentages inside expressions. For example, use `0.85` for an 85 percent multiplier and `0.15` for a 15 percent decrease.3031Example for a grocery total with a fixed reduction and member discount:3233- `expression`: `(9.5*10 + 4.8*15 + 15*5 - 30) * 0.85`34- `precision`: `2`3536`calculate` accepts:3738- `operation`: `add`, `subtract`, `multiply`, `divide`, `power`, or `mod`.39- `left`: left operand.40- `right`: right operand.41- `precision`: optional decimal places from 0 to 12.4243`percentage` accepts:4445- `operation`: `percent_of`, `change`, `apply_increase`, or `apply_decrease`.46- `value`: base value for `percent_of`, `apply_increase`, and `apply_decrease`.47- `percent`: percentage value, for example `15` means 15 percent.48- `from`: original value for `change`.49- `to`: new value for `change`.50- `precision`: optional decimal places from 0 to 12.