{"id":"array-integer-median","version":"1.0.0","description":"Select lower and upper middle canonical integers; emit median only for odd length.","supported_operations":["array integer median","median of integer strings","middle values of an integer list"],"unsupported_operations":["average even-length arrays","floating-point median","percentiles","CSV column median"],"semantics":["values is a non-empty array of at most 10000 canonical integer strings (BigInt; -0 becomes 0).","Values are sorted by numeric order ascending; equal values keep their original index order.","n is the input length as a JSON integer.","For odd n, lower, upper, and median are the sorted element at 0-based index (n-1)/2.","For even n, lower is sorted[n/2 - 1], upper is sorted[n/2], and the median key is omitted (no averaging).","lower, upper, and median (when present) are canonical integer strings."],"limits":{"max_values":10000,"max_digits":1000},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["values"],"properties":{"values":{"type":"array","minItems":1,"maxItems":10000,"items":{"type":"string","minLength":1,"maxLength":1001}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["n","lower","upper"],"properties":{"n":{"type":"integer","minimum":1,"maximum":10000},"lower":{"type":"string","pattern":"^(0|-?[1-9][0-9]*)$"},"upper":{"type":"string","pattern":"^(0|-?[1-9][0-9]*)$"},"median":{"type":"string","pattern":"^(0|-?[1-9][0-9]*)$"}}},"examples":[{"input":{"values":["9","-1","4"]},"output":{"n":3,"lower":"4","upper":"4","median":"4"}},{"input":{"values":["8","1","3","2"]},"output":{"n":4,"lower":"2","upper":"3"}}],"execute_url":"/v1/tools/array-integer-median/versions/1.0.0/execute"}