Skip to main content
Glama

Ratio Calculator

ratio_calculator
Read-onlyIdempotent

Simplify decimal A:B ratios, solve A:B = C:?, or scale the ratio to a target term or total.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYesNonnegative A term
bYesNonnegative B term
cNoKnown C term in C:?
modeYesOperation
targetNoTarget amount in the same units as A and B
targetPartNoPart assigned the target; default a

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is fully covered by structured data. The description adds the input domain (decimal ratios) and case semantics, but says nothing about output form, rounding/precision, or how degenerate inputs (e.g., zero terms) are handled.

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?

A single sentence, front-loaded with the primary operation (simplify), with no filler or repetition of the title/schema. Every clause maps to a real mode of the tool.

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?

With an output schema present, the description need not explain return values, and the mode enumeration plus annotations make the tool callable. It is nearly complete, with only the semantics of non-integer/zero input handling left implicit.

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 the baseline is 3. The description goes slightly beyond the schema by glossing the 'solve' case as A:B = C:? (clarifying c's role) and by describing target as a 'target term or total', which maps directly onto the targetPart enum values a|b|total.

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?

The description names the resource (decimal A:B ratios) and enumerates three distinct operations — simplify, solve A:B = C:?, and scale — matching the mode enum, so the agent knows exactly what the tool computes. It does not explicitly differentiate itself from near-neighbors like fraction_calculator or percentage_calculator, but 'ratio' is a distinctive enough domain that confusion is unlikely.

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?

Each mode is paired with the problem shape it addresses ('solve A:B = C:?' implies you have a known C and want the missing term; 'scale to a target term or total' implies you have an amount to fit into the ratio). This gives clear per-mode context for selection, but there are no explicit exclusions or pointers to alternative calculator 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