validate_postal_code_latam
Validates postal code format for Latin American countries (BR, MX, CL, AR, CO) using official patterns, ensuring correct addresses for checkout and logistics.
Instructions
Validates a postal code format for a given Latin American country using the official pattern for that country. Returns { valid: boolean, postal_code: string, country: string, format: string }. Supports BR (8-digit CEP), MX (5-digit CP), CL (7-digit with dash), AR (4-digit legacy or CPA alphanumeric), CO (6-digit). Use in e-commerce checkout validation, address verification, or logistics workflows across LatAm markets.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"postal_code": "<postal_code>",
"country_code": "<country_code>"
},
"name": "validate_postal_code_latam"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| postal_code | Yes | Postal code to validate. Example: '01310-100' for BR, '06600' for MX, '8320000' for CL | |
| country_code | Yes | Two-letter ISO country code. Example: 'BR', 'MX', 'CL', 'AR', 'CO' |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | Yes | ||
| postal_code | No | ||
| country | No | ||
| format | No | ||
| reason | No |