Skip to main content
Glama

Ratio Calculator

calculator_ratio
Read-only

Use this tool to simplify a ratio a : b using GCD. Example: 20 : 30 → 2 : 3.

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": {
      "a": "<a>",
      "b": "<b>"
    },
    "name": "calculator_ratio"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYesFirst term of the ratio.
bYesSecond term of the ratio.

Output Schema

NameRequiredDescriptionDefault
aYes
bYes
gcdYes
resultYes
expressionYes
simplified_aYes
simplified_bYes

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 the safety profile is fully covered. The description adds the computational method (GCD reduction), which usefully explains that input is transformed rather than merely returned. It does not address edge behavior such as a zero or negative term, where a ratio simplifier's result is unclear.

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 short sentences, zero waste, with the action front-loaded before the example. Nothing could be removed without losing the demonstration of the output format.

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 pure, two-integer, read-only tool with a full input schema and an output schema, the description covers purpose, method, and a concrete example. Only edge-case behavior (zero/negative terms) is left implicit, which is minor given the structured data provided.

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%, so the baseline is 3. The example '20 : 30 → 2 : 3' adds a small amount of value by tying the parameter order to the output form, but it does not explain sign handling, zero terms, or what happens to non-integer input.

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 (simplify) and resource (ratio a : b) plus the method (GCD) and a worked example, so the transform is unambiguous. It does not name distinguishing siblings such as calculator_gcd, calculator_simplify, calculator_fraction, or calculator_proportion, which overlap conceptually in a 140+ tool family.

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 to simplify a ratio" implies the usage condition, but there is no statement of when NOT to use it or which sibling to pick instead. With near-duplicate neighbors (calculator_simplify reduces expressions, calculator_fraction handles fraction forms, calculator_gcd returns the divisor itself), explicit routing guidance would be far more valuable than the example.

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.