search_cities
Case-insensitive substring search over the global cities catalog.
Useful to resolve a human-readable location into a numeric city_id
before creating an offline or mixed event.
Each result is preloaded with its region and country to avoid
N+1 queries on the caller side.
Behavior:
Matches
name LIKE "%q%"(substring, case-insensitive in MySQLutf8_general_ci).Wildcards
%and_inqare escaped — no client-side wildcard matching.Optional
country_iso_codenarrows results to a single country (case-insensitive).Results are ordered by
name ASC.Capped at 20 results (no pagination — refine the query instead).
Response is cacheable for 30 minutes (
Cache-Control: public, max-age=1800).
Rate limit: 100 requests/minute per IP (600 for whitelisted IPs).
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": {
"q": "<q>"
},
"name": "search_cities"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Substring to search for in the city name. Must be non-blank. Wildcards `%` and `_` are escaped before matching. | |
| country_iso_code | No | Optional ISO 3166-1 alpha-2 country code to narrow results (case-insensitive). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| status | Yes |