Skip to main content
Glama

Fraction Calculator

calculator_fraction
Read-only

Use this tool for fraction addition, subtraction, multiplication, or division. Always returns a simplified fraction.

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": {
      "numerator1": "<numerator1>",
      "denominator1": "<denominator1>",
      "numerator2": "<numerator2>",
      "denominator2": "<denominator2>",
      "operation": "<operation>"
    },
    "name": "calculator_fraction"
  }
}

Input Schema

NameRequiredDescriptionDefault
operationYesOperation: add, subtract, multiply, divide (or +, -, *, /, ×, ÷).
numerator1YesNumerator of the first fraction.
numerator2YesNumerator of the second fraction.
denominator1YesDenominator of the first fraction.
denominator2YesDenominator of the second fraction.

Output Schema

NameRequiredDescriptionDefault
resultYes
operationYes
expressionYes
numerator1Yes
numerator2Yes
denominator1Yes
denominator2Yes
result_numeratorYes
result_denominatorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is covered by structured data. The description adds one genuine behavioral fact: output is always simplified. It does not mention edge-case behavior such as division by zero or negative-denominator normalization, which is the main thing an agent would want to know.

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

Conciseness5/5

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

Two sentences, zero filler, with the applicable operations front-loaded and the output guarantee second. Nothing repeats the title verbatim beyond necessity.

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?

An output schema and full parameter descriptions exist, so the description needn't explain return values or argument formats. What it covers — what the tool computes and that results are reduced — is the right residue. Minor gap: no note that denominators must be non-zero or how improper results are presented.

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

Parameters3/5

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

Schema description coverage is 100% and the operation enum with symbolic aliases is fully documented in the schema, so baseline 3 applies. The description contributes nothing about the parameters — it does not clarify ordering (numerator1/denominator1 pairing) or whether a raw-denominator zero is rejected.

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

Purpose4/5

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

States a specific verb and resource: arithmetic addition, subtraction, multiplication and division of fractions. An agent can distinguish it from calculator_simplify or calculator_gcd by the operation set named. It stops short of naming the closest siblings (calculator_mixed_fraction, calculator_basic) explicitly.

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

Usage Guidelines3/5

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

'Use this tool for fraction addition, subtraction, multiplication, or division' gives a clear trigger condition implied by the operation list. It does not say when NOT to use it — e.g. that mixed numbers belong to calculator_mixed_fraction, or that single-fraction reduction belongs to calculator_simplify. No alternatives are named among ~150 siblings.

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.