30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

GeoDirectory Manage Location

geodirectory/manage-location manages the locations a directory covers: create adds a city, update edits one by ID, set_default makes one the site default.

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

Abilitygeodirectory/manage-location
ToolsetGeoDirectory — toolset/geodirectory
GroupGeoDirectory › Locations
RequiresAcrossAI Pro, plus GeoDirectory active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableNot idempotent — each call changes the row set, so re-running is not a no-op
Ships inAcrossAI Pro 0.9.16 and later

How it works

City, region, country, latitude and longitude are all required on create and update. That is more than it looks: the coordinates are the city centre, and they are what proximity search measures from when a listing has no coordinates of its own.

The country must be one GeoDirectory recognises, or the write is rejected. That check is what stops the typo problem described in the listing read — a country it does not know is an error rather than a new country.

The region carries no such check, so region spelling is worth being consistent about by hand.

The default location matters more than it sounds. Listings created without a city inherit it, and visitors arriving without a location see it — so it is both a data default and a front-end default.

The SEO fields — meta title, meta description, description, image tagline — apply to the location’s own archive page, which on a multi-city directory is a real landing page.

Not idempotent for create.

Input

NameTypeRequiredWhat it is
actionstringYescreate, update or set_default.
location_idintegerFor update and set_defaultLocation row ID.
citystringFor create and updateCity name.
regionstringFor create and updateRegion or state name.
countrystringFor create and updateCountry name. Must be one GeoDirectory recognises.
latitudenumberFor create and updateCity centre latitude.
longitudenumberFor create and updateCity centre longitude.
meta_titlestringNoSEO title for this location’s pages.
meta_descriptionstringNoSEO meta description.
descriptionstringNoDescription shown on the location archive.
image_taglinestringNoCaption for the location header image.

What comes back

NameTypeWhat it is
locationobjectThe location after the write.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent 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:

Add Bristol to the directory.

It resolves to one call:

{
  "ability": "geodirectory/manage-location",
  "parameters": {
    "action": "create",
    "city": "Bristol",
    "region": "Somerset",
    "country": "United Kingdom",
    "latitude": 51.4545,
    "longitude": -2.5879
  }
}

Worth knowing

  • The coordinates are the city centre and are what proximity search falls back to.
  • An unrecognised country is rejected; a misspelled region is not.
  • The default location is inherited by listings and shown to unlocated visitors.
  • Requires the Location Manager add-on.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading