basic_arithmetic
Perform basic arithmetic operations like addition, subtraction, multiplication, and division on lists of numbers with optional high-precision decimal calculations and configurable precision.
Instructions
Brief description: Basic arithmetic operations tool, supporting addition, subtraction, multiplication, division, and high-precision calculations. //
Examples:
basic_arithmetic(operation='add', numbers=[1, 2, 3, 4, 5])
basic_arithmetic(operation='multiply', numbers=[2.5, 3.7], precision=3)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"operation": "<operation>",
"numbers": "<numbers>"
},
"name": "basic_arithmetic"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | Arithmetic operation type. Supports: 'add', 'subtract', 'multiply', 'product', 'divide', 'power', 'modulo', 'modulus', 'factorial', 'gcd', 'lcm', 'sum', 'average' | |
| numbers | Yes | List of numbers for the operation. Must contain at least one number | |
| precision | No | Number of decimal places for the result. Range 0-15 | |
| use_decimal | No | Whether to use high-precision decimal calculation |