{"id":"duration-add","version":"1.0.0","description":"Sum mixed SI duration terms in nanoseconds and return the exact rational in a target unit.","supported_operations":["duration add","add duration terms","sum mixed duration units"],"unsupported_operations":["months","years","weeks","leap seconds","ISO-8601 duration strings","average duration","floats"],"semantics":["terms is a non-empty list of at most 32 {value, unit} duration amounts.","Each value is a canonical integer string; unit is one of ns, us, ms, s, min, h, day.","Terms are converted to nanoseconds with BigInt, summed, then expressed in the to unit as a reduced rational.","day is exactly 86400 seconds; negative terms are allowed; leap seconds are not applied.","Input integers and the reduced numerator and denominator may have at most 1000 digits excluding sign."],"limits":{"max_digits":1000,"max_terms":32,"units":["ns","us","ms","s","min","h","day"]},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["terms","to"],"properties":{"terms":{"type":"array","minItems":1,"maxItems":32,"items":{"type":"object","additionalProperties":false,"required":["value","unit"],"properties":{"value":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$","maxLength":1001},"unit":{"type":"string","enum":["ns","us","ms","s","min","h","day"]}}}},"to":{"type":"string","enum":["ns","us","ms","s","min","h","day"]}}},"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":{"terms":[{"value":"1","unit":"min"},{"value":"30","unit":"s"}],"to":"s"},"output":{"numerator":"90","denominator":"1"}}],"execute_url":"/v1/tools/duration-add/versions/1.0.0/execute"}