{"id":"mass-convert","version":"1.0.0","description":"Convert a canonical integer mass amount between exact nanogram-based units as a reduced rational.","supported_operations":["mass convert","convert mass units","convert grams kilograms pounds"],"unsupported_operations":["troy ounces or pounds","stone","short tons","long tons","floating-point mass","SI prefixes other than ng ug mg g kg t"],"semantics":["value is a canonical integer string amount in the from unit; negative amounts are allowed and -0 canonicalizes to 0.","Units are exactly ng, ug, mg, g, kg, t, oz, and lb from MASS_NG.","t is the metric tonne (1000 kg); lb is the international avoirdupois pound (exactly 0.45359237 kg); oz is 1/16 lb.","Conversion is the exact rational value * from_ng / to_ng, reduced by gcd, with the sign only on the numerator.","The output is a canonical rational {numerator, denominator} expressed in the to unit.","Unknown units, unknown fields, non-canonical integers, and results whose reduced components exceed 1000 digits are rejected."],"limits":{"max_digits":1000},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["value","from","to"],"properties":{"value":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$","maxLength":1001},"from":{"type":"string","enum":["ng","ug","mg","g","kg","t","oz","lb"]},"to":{"type":"string","enum":["ng","ug","mg","g","kg","t","oz","lb"]}}},"output_schema":{"type":"object","additionalProperties":false,"required":["numerator","denominator"],"properties":{"numerator":{"type":"string","pattern":"^(0|-?[1-9][0-9]*)$"},"denominator":{"type":"string","pattern":"^[1-9][0-9]*$"}}},"examples":[{"input":{"value":"500","from":"mg","to":"g"},"output":{"numerator":"1","denominator":"2"}}],"execute_url":"/v1/tools/mass-convert/versions/1.0.0/execute"}