Skip to main content
Glama
Ingredient Convert MCP

Ingredient Convert MCP

decimal_to_fraction

Read-onlyIdempotent

Convert decimal amounts to cooking fractions like 1/2 or 1 3/4 with a chosen denominator cap for accurate recipe measurements.

Instructions

Convert a decimal amount to a friendly cooking fraction (e.g. 0.5 -> 1/2, 1.75 -> 1 3/4) with a denominator cap.

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": {
      "value": "<value>"
    },
    "name": "decimal_to_fraction"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueYes
max_denominatorNoLargest denominator allowed (default 8)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

B3.4/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety and repeatability are covered. The description adds the notion of a denominator cap constraining the approximation, but it does not disclose what happens when no close fraction exists (rounding error, best-effort approximation) or how the cap affects precision.

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 with the core action front-loaded and two inline examples that convey input and output shape without waste. Nothing is redundant or padded.

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 simple two-parameter pure conversion function with no output schema, the definition is nearly sufficient — the examples effectively communicate the return format. The remaining gap is edge-case behavior when the decimal cannot be closely approximated under the cap.

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 coverage is 50%: max_denominator is documented with its default and bounds, while value is undocumented but self-evident from the tool name. The description's 'denominator cap' phrasing restates what the schema already says and adds no extra meaning such as how the cap trades off accuracy.

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 gives a specific verb and resource (convert a decimal amount to a cooking fraction) and reinforces it with two concrete input/output examples. The direction of conversion makes it obviously distinct from fraction_to_decimal, though it never names that sibling explicitly.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance and no reference to the inverse tool fraction_to_decimal or to scale_recipe/convert_ingredient. Only the phrase 'friendly cooking fraction' hints at the domain, leaving the agent to infer the selection criteria.

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