geodirectory/list-locations lists the countries, regions, cities or neighbourhoods configured on this site.
Requires the Location Manager add-on. Without it the locations table does not exist and the ability says so rather than returning an empty list that reads as “no locations configured”.
At a glance
| Ability | geodirectory/list-locations |
| Toolset | GeoDirectory — toolset/geodirectory |
| Group | GeoDirectory › Locations |
| Requires | AcrossAI Pro, plus GeoDirectory active on the site |
| Capability | manage_options |
| Safety | Read-only — changes nothing |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Pro 0.9.16 and later |
How it works
Countries, regions and cities are not three tables. Each row is a city, carrying its region and its country as fields on the same record — so the country and region views are projections over the same data rather than separate lists.
That has a practical consequence: there is no such thing as creating a country. A country exists because a city names it, and it stops existing when the last city naming it is removed.
It also means a typo in a country name creates a new country. Two cities spelling the same country differently produce two countries in the archive, with the listings split between them.
Neighbourhoods are a genuine sub-level and only exist when neighbourhoods are enabled.
The slug filter fetches one location rather than listing, which is the cheap way to check whether a location already exists before creating it.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
type | string | No | Which level to list. neighbourhoods needs neighbourhoods enabled. |
slug | string | No | Fetch one location by slug instead of listing. |
country | string | No | Filter to this country. |
region | string | No | Filter to this region. |
city | string | No | Filter to this city. |
search | string | No | Free-text search on the location name. |
orderby | string | No | Sort key. Defaults to city. |
order | string | No | Sort direction. |
per_page | integer | No | Rows per page. |
page | integer | No | Page number. |
What comes back
| Name | Type | What it is |
|---|---|---|
locations | array | Each location row with its city, region, country and coordinates. |
total | integer | How many matched. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Which cities does our directory cover?
It resolves to one call:
{
"ability": "geodirectory/list-locations",
"parameters": {
"type": "cities"
}
}Worth knowing
- Every row is a city. Countries and regions are projections over them.
- A typo in a country name creates a second country.
- Neighbourhoods need to be enabled separately.
- Requires the Location Manager add-on.
Related abilities
- GeoDirectory Manage Location — add or change one
- GeoDirectory List Listings — filter listings by location
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category