Skip to main content
Glama

Ingredient Grams and Cups Converter

mass_volume_convert
Read-onlyIdempotent

Convert mass to volume or reverse with named units and either a USDA FoodData Central ingredient cup-weight preset or an entered positive density in g/mL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesOpposite dimension from source.
fromYesExplicit mass or volume source.
valueYesNonnegative decimal (up to 24 digits, effective exponent ±24), fraction (1/2) or mixed fraction (1 1/2). Quantity and integer fraction components ≤10^12; denominator >0; proper fractional part for mixed values.
densityNoCustom density in grams per milliliter; exactly one of density or ingredient is required.
ingredientNoUSDA FDC ingredient cup-weight preset, interpreted using a 236.5882365 mL US customary cup. Exactly one of ingredient or density is required.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / examples
      Previous value: -[
      -  {
      -    "density": 0.5,
      -    "from": "g",
      -    "to": "us_cup",
      -    "value": "118.29411825"
      -  }
      -]New value: +[
      +  {
      +    "density": 0.5,
      +    "from": "g",
      +    "to": "us_cup",
      +    "value": "118.29411825"
      +  },
      +  {
      +    "from": "us_cup",
      +    "ingredient": "granulated_sugar",
      +    "to": "g",
      +    "value": "1"
      +  }
      +]
    • addedInput schema / oneOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "ingredient"
      +      ]
      +    },
      +    "required": [
      +      "density"
      +    ]
      +  },
      +  {
      +    "not": {
      +      "required": [
      +        "density"
      +      ]
      +    },
      +    "required": [
      +      "ingredient"
      +    ]
      +  }
      +]
    • changedInput schema / properties / density / description
      Previous value: -"Required density in grams per milliliter; no ingredient presets."New value: +"Custom density in grams per milliliter; exactly one of density or ingredient is required."
    • addedInput schema / properties / ingredient
      Added value: +{
      +  "description": "USDA FDC ingredient cup-weight preset, interpreted using a 236.5882365 mL US customary cup. Exactly one of ingredient or density is required.",
      +  "enum": [
      +    "all_purpose_flour",
      +    "bread_flour",
      +    "whole_wheat_flour",
      +    "granulated_sugar",
      +    "packed_brown_sugar",
      +    "powdered_sugar",
      +    "butter",
      +    "water",
      +    "whole_milk",
      +    "honey",
      +    "vegetable_oil",
      +    "uncooked_white_rice",
      +    "rolled_oats",
      +    "unsweetened_cocoa_powder",
      +    "table_salt"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "value",
      -  "from",
      -  "to",
      -  "density"
      -]New value: +[
      +  "value",
      +  "from",
      +  "to"
      +]
    • changedOutput schema / description
      Previous value: -"Structured entered quantities, explicit unit labels, calculated results and formula; numeric arithmetic from entered values, with no inferred density, coverage or prices."New value: +"Entered quantity, unit labels, computed density and result, formula; ingredient presets also include the ingredient key, grams per US customary cup, FDC ID and source URL."
  2. Added

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered. The description adds the density/ingredient requirement, but that is also encoded in the schema's oneOf and parameter descriptions, so little new behavioral context is contributed.

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?

A single front-loaded sentence with the core action first and the discriminating detail (density or ingredient) second. No filler, though it packs several constraints into one clause rather than breaking them out for scannability.

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 exists, so return values need not be explained, and annotations cover the safety profile. The description conveys the essential mechanic (cross-dimension conversion via density or ingredient) adequately for a 5-parameter tool, with only sibling routing left implicit.

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 every parameter is already documented in the schema, including the density XOR ingredient constraint, the g/mL unit, and the value formats. The description restates the density requirement without adding syntax or format detail beyond the schema; baseline 3 applies.

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 (convert) and the specific transformation (mass to volume or reverse) with the two mechanisms that make it distinct: a USDA FDC ingredient preset or an entered density in g/mL. This separates it from the generic sibling unit_convert, 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 Guidelines3/5

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

Usage is only implied: the mention of density/ingredient signals that this tool is for cross-dimension (mass↔volume) conversions. There is no explicit when-to-use vs. unit_convert guidance, no note that same-dimension conversions belong elsewhere, and no prerequisites or exclusions.

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