Home / Servers / Calculators / fraction

Fraction

An MCP tool from the Calculators server, hosted on mcp.hjlabs.in.

Simplify a fraction, convert a decimal to the closest fraction (with a maximum denominator), or convert a fraction to a decimal and a mixed number. Also adds, subtracts, multiplies and divides two fractions exactly.

Name on the gateway: math__fraction · read-only.

Parameters

NameTypeDescription
value requiredstringA fraction "3/12", a decimal "0.375", or a mixed number "1 1/2".
otherstringA second fraction for arithmetic. Optional.
opadd | subtract | multiply | divideOperation with `other`.
max_denominatorintegerFor decimals: largest denominator to try. Default 10000.

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "math__fraction",
  "arguments": {
    "value": "…"
  }
}

Or connect the Calculators server directly, which lists 28 tools including this one:

Run in your terminal
claude mcp add --transport http hj-math https://mcp.hjlabs.in/mcp/math \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the fraction tool with value set to ….

More from Calculators