Look up provinces and wards by name
search_unitsSearch Vietnamese provinces, districts, and wards by name while ignoring diacritics and small typos, returning official current codes or mapping legacy units to today's structure.
Instructions
Searches administrative units by name, ignoring diacritics and tolerating small typos. scope "current" (default) searches the 34 provinces and 3,321 wards in force today and returns official codes. scope "legacy" searches pre-2025 provinces, districts and wards and returns where each one maps to now. Tra cứu tỉnh/thành, phường/xã theo tên, kèm mã đơn vị hành chính.
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": {
"query": "<query>"
},
"name": "search_units"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| level | No | "district" exists only in legacy scope. | any |
| limit | No | ||
| query | Yes | Name or part of a name, e.g. "bến nghé", "thu duc", "Sa Pa". | |
| scope | No | current | |
| province | No | Restrict to one province (name or 2-digit code). |