Fraction calculator
hopi_fraction_calculatorAdd, subtract, multiply or divide two fractions, giving the simplified result, a mixed number where relevant, and the decimal value. Each fraction is a numerator over a denominator, all whole numbers (numerators may be negative). Source: https://hopi.co.uk/fraction-calculator/
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": {
"op": "<op>",
"n1": "<n1>",
"d1": "<d1>",
"n2": "<n2>",
"d2": "<d2>"
},
"name": "hopi_fraction_calculator"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| d1 | Yes | First denominator (not zero) | |
| d2 | Yes | Second denominator (not zero) | |
| n1 | Yes | First numerator | |
| n2 | Yes | Second numerator | |
| op | Yes | Operation: add, sub (subtract), mul (multiply) or div (divide) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| mixed | Yes | ||
| result | Yes | ||
| decimal | Yes | ||
| summary | Yes | ||
| numerator | Yes | ||
| source_url | Yes | The tool's page on hopi.co.uk (cite or open to check the figure) | |
| denominator | Yes |