name: calculator description: Perform deterministic arithmetic, percent-based math, and change-rate math. when_to_use: Use this skill when the user asks for exact arithmetic, percents, growth or decrease rates, discounts, markups, ratios, or numeric comparisons that should not be estimated mentally. provider_type: builtin provider_id: calculator runtime_type: tool tools:
- evaluate_expression
- calculate
- percentage
max_calls_per_turn: 50
timeout_seconds: 5
display:
icon: calculator
category: productivity
label:
en_US: Calculator
zh_Hans: 计算器
description:
en_US: Handles exact arithmetic, percentages, discounts, and numeric comparisons.
zh_Hans: 用于精确计算、百分比、折扣、变化率和数值比较。
when_to_use:
en_US: Use when answers require exact calculation instead of mental math.
zh_Hans: 当问题需要精确计算,而不是让模型心算时启用。
tags:
en_US:
- Math
- Arithmetic zh_Hans:
- 数学
- 精确计算
Calculator Skill
Use this skill for exact arithmetic and percentage tasks.
Workflow
- Prefer one
call_skill_toolcall withtool_nameset toevaluate_expressionwhen 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
calculateonly when a single binary operation is clearer than a full expression. - Use
percentageonly 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.85precision:2
calculate accepts:
operation:add,subtract,multiply,divide,power, ormod.left: left operand.right: right operand.precision: optional decimal places from 0 to 12.
percentage accepts:
operation:percent_of,change,apply_increase, orapply_decrease.value: base value forpercent_of,apply_increase, andapply_decrease.percent: percentage value, for example15means 15 percent.from: original value forchange.to: new value forchange.precision: optional decimal places from 0 to 12.