search_by_city
Find postal codes for any city worldwide. Provide city name, state (for US), and optional country code to retrieve all associated postal codes.
Instructions
Find all postal codes for a given city.
Use this when someone has a city name and needs the postal codes that serve it. For US cities, provide the state name or 2-letter abbreviation.
Args: city: City name (e.g., "Beverly Hills", "Berlin", "Tokyo") state: State or region name/abbreviation. Required for US cities (e.g., "CA" or "California"). country: ISO 3166-1 alpha-2 country code. Defaults to "US".
Returns: List of postal codes for the city.
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": {
"city": "<city>"
},
"name": "search_by_city"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | Yes | ||
| state | No | ||
| country | No | US |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |