Skip to main content
Glama

Fraction to decimal converter

hopi_fraction_to_decimal
Read-onlyIdempotent

Convert between fractions and decimals. Mode 'toDecimal': give a numerator and denominator (whole numbers) to get the decimal and percentage. Mode 'toFraction': give a decimal to get the closest simplified fraction (denominator up to 10,000), noting whether it is exact. Source: https://hopi.co.uk/fraction-to-decimal/

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes'toDecimal' from a fraction, or 'toFraction' from a decimal
decimalNoThe decimal to convert (mode 'toFraction')
numeratorNoNumerator (mode 'toDecimal')
denominatorNoDenominator, not zero (mode 'toDecimal')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
exactYes
decimalYes
summaryYes
numeratorYes
recurringNo
percentageNo
source_urlYesThe tool's page on hopi.co.uk (cite or open to check the figure)
denominatorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / required
      Added value: +[
      +  "decimal",
      +  "denominator",
      +  "exact",
      +  "mode",
      +  "numerator",
      +  "source_url",
      +  "summary"
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With annotations already covering read-only and idempotent behavior, the description adds valuable functional details: approximation behavior (closest simplified fraction), denominator limit of 10,000, and whether results are exact. This is beyond what annotations convey.

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?

Three sentences front-load the purpose and mode details. The source URL is slightly extraneous but not harmful. Overall, every sentence earns its place.

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?

Given an output schema exists and annotations are rich, the description covers both modes, input constraints, and output characteristics (percentage, exactness). It does not mention error handling or edge cases, but that is adequately handled by the schema.

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%, so baseline is 3. The description adds meaningful constraints beyond the schema: 'whole numbers' for numerator/denominator and the denominator cap of 10,000, plus clarifying the output (decimal and percentage).

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?

The description clearly states the tool converts between fractions and decimals, with explicit mode definitions. It distinguishes itself from siblings like hopi_fraction_calculator by focusing on conversion rather than arithmetic.

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?

Clear context is provided for each mode ('toDecimal' requires numerator/denominator, 'toFraction' requires decimal). However, no explicit alternatives or when-not-to-use guidance is given relative to sibling tools.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources