| name | calculator |
| description | Perform mathematical calculations, unit conversions, and solve math problems |
| metadata | {"agent-player":{"emoji":"🧮","version":"1.0.0","author":"Agent Player Team","category":"utilities","tags":["math","calculator","conversion"],"triggers":["calculate","compute","math","convert","how much is","what is"],"settings":[{"key":"decimal_places","type":"number","label":"Decimal Places","default":2,"validation":{"min":0,"max":10}},{"key":"show_steps","type":"boolean","label":"Show Calculation Steps","default":false}],"requires":{"libs":["mathjs"],"apis":["exchangerate-api.com"]}}} |
Calculator Skill
Perform mathematical calculations, conversions, and solve math problems.
Usage
Ask math questions naturally:
Calculate 15% of 200
What is 25 * 4 + 10?
Convert 100 USD to EUR
Square root of 144
How much is 5 miles in kilometers?
Supported Operations
Basic Math
| Operation | Syntax | Example |
|---|
| Addition | a + b | 2 + 3 → 5 |
| Subtraction | a - b | 10 - 5 → 5 |
| Multiplication | a * b | 4 * 6 → 24 |
| Division | a / b | 20 / 4 → 5 |
| Power | a ^ b | 2 ^ 8 → 256 |
| Modulo | a % b | 17 % 5 → 2 |
Advanced Math
sqrt(144)
pow(2, 10)
log(100)
sin(45)
cos(90)
tan(30)
pi
e
Percentages
15% of 200
200 + 15%
200 - 10%
Unit Conversions
Length:
5 miles to km
10 feet to meters
Weight:
10 pounds to kg
100 grams to oz
Temperature:
100 fahrenheit to celsius
25 celsius to fahrenheit
Currency (live rates):
100 USD to EUR
50 GBP to JPY
Examples
User: "Calculate 15% of 200"
Response:
🧮 Calculation: 15% of 200
Result: 30
Breakdown:
200 × 0.15 = 30
User: "Convert 5 miles to kilometers"
Response:
📏 Unit Conversion
5 miles = 8.05 kilometers
Formula: 1 mile = 1.609344 km
Settings
| Setting | Type | Default | Description |
|---|
decimal_places | number | 2 | Precision (0-10 decimals) |
show_steps | boolean | false | Show calculation steps |
Security
Uses mathjs library for safe expression evaluation. No eval() or code injection possible.