{"id":"mx-clabe-validate","version":"1.0.0","description":"Validate an 18-digit Mexican CLABE's weighted check digit and split it into bank, plaza and account fields.","supported_operations":["validate a mexican clabe","check clabe check digit","is this a valid interbank clabe","split a clabe into bank branch and account","verify a spei clabe before sending money","clabe checksum calculator"],"unsupported_operations":["looking up the bank name for a bank_code (no Banxico bank registry is pinned)","computing a CLABE from a bank/plaza/account triple (this tool only validates)","IBAN or ABA routing-number validation"],"semantics":["clabe is taken exactly as given: no trimming, no removal of spaces or hyphens, no case folding.","If clabe.length is not 18, valid:false, reason:'wrong_length', bank_code:null, plaza_code:null, account_number:null, check_digit:null.","Otherwise, if clabe does not match ^[0-9]{18}$, valid:false, reason:'invalid_character', with the same fields null.","Otherwise bank_code = clabe[0:3], plaza_code = clabe[3:6], account_number = clabe[6:17], check_digit = clabe[17] (echoed as given). All four are populated from here on regardless of checksum validity.","Expected check digit over the first 17 digits: weights cycle [3,7,1] starting at position 0; each digit is multiplied by its weight and reduced mod 10 (a per-position reduction, not a plain weighted sum); the 17 reduced values are summed (s); expected = (10 - (s mod 10)) mod 10.","If check_digit differs from expected, valid:false, reason:'check_digit_mismatch'. Otherwise valid:true, reason:null. No bank-registry lookup: bank_code is returned as parsed even when unassigned."],"limits":{"max_clabe_bytes":24},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["clabe"],"properties":{"clabe":{"type":"string","minLength":1,"maxLength":24}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","reason","bank_code","plaza_code","account_number","check_digit"],"properties":{"valid":{"type":"boolean"},"reason":{"type":["string","null"],"enum":[null,"wrong_length","invalid_character","check_digit_mismatch"]},"bank_code":{"type":["string","null"],"pattern":"^[0-9]{3}$"},"plaza_code":{"type":["string","null"],"pattern":"^[0-9]{3}$"},"account_number":{"type":["string","null"],"pattern":"^[0-9]{11}$"},"check_digit":{"type":["string","null"],"pattern":"^[0-9]$"}}},"examples":[{"input":{"clabe":"723010123456789019"},"output":{"valid":true,"reason":null,"bank_code":"723","plaza_code":"010","account_number":"12345678901","check_digit":"9"}},{"input":{"clabe":"002000000000000007"},"output":{"valid":false,"reason":"check_digit_mismatch","bank_code":"002","plaza_code":"000","account_number":"00000000000","check_digit":"7"}},{"input":{"clabe":"12345"},"output":{"valid":false,"reason":"wrong_length","bank_code":null,"plaza_code":null,"account_number":null,"check_digit":null}}],"execute_url":"/v1/tools/mx-clabe-validate/versions/1.0.0/execute"}