Skip to main content
Glama

Fraction calculator

calc_fraction
Read-onlyIdempotent

Compute exact fraction math with big integers—solve expressions, convert decimals (including repeating), and compare fractions with worked steps and no rounding.

Instructions

Exact fraction maths with big integers (never rounded) and worked steps. calculate: an expression with fractions, mixed numbers ("1 1/2"), decimals and repeating decimals ("0.(3)"), + − × ÷ ^ and brackets (a/b binds tighter than ÷). decimal_to_fraction: "0.75", "0.1(6)" (brackets mark the repeating part), with close small-denominator approximations. fraction_to_decimal: exact decimal with the repeating block, and percent. compare: put two or more fractions in order. Web version: https://s3eidat.github.io/fraction-calc/

Input Schema

NameRequiredDescriptionDefault
modeNoWhat to do.calculate
inputYescalculate: "1 1/2 + 3/4 × 2/5"; decimal_to_fraction: "0.1(6)"; fraction_to_decimal: "5/7"; compare: "2/3, 3/5, 7/10".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnlyHint, idempotentHint, openWorldHint=false), so the bar is lower, but the description still adds real behavioral value: results are exact and never rounded, big integers are used, worked steps are returned, and approximations are small-denominator and flagged as such. It doesn't describe error handling for malformed expressions or the exact shape of the returned steps, and there is no output schema to cover that gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense paragraph that front-loads the core capability before mode-by-mode detail — nothing is buried. The trailing web-version URL is the only content that doesn't help an agent invoke the tool, and the mode list is somewhat compressed into one long sentence, but overall it earns its length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter, enum-driven calculator with no output schema, the description covers what each mode does, the accepted input syntax, and roughly what comes back (exact value, steps, percent, ordered list). The only meaningful gaps are error behavior on invalid expressions and the concrete shape of the returned steps, which the absence of an output schema leaves undone.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already supplies per-mode input examples, so the baseline would be 3. The description earns an extra point by adding syntax rules the schema omits: operator set (+ − × ÷ ^, brackets), the precedence rule that a/b binds tighter than ÷, the convention that brackets mark the repeating part, and the input separator style for compare.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource framing ("Exact fraction maths with big integers... and worked steps") and then enumerates all four modes with concrete input examples. An agent can distinguish this from sibling calculators like calc_expression, calc_equation, or calc_percentage purely from the description, since fraction/mixed-number/repeating-decimal handling is called out explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for selecting each mode (calculate vs decimal_to_fraction vs fraction_to_decimal vs compare) with representative inputs. It stops short of naming alternatives — e.g. it never says when to prefer calc_expression for non-fraction arithmetic or calc_percentage for percent work — so routing against siblings is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools