geodirectory/list-listing-fields returns the custom-field definitions for a listing type. It is the authoritative schema for that type.
Every listing write in this suite depends on it.
At a glance
| Ability | geodirectory/list-listing-fields |
| Toolset | GeoDirectory — toolset/geodirectory |
| Group | GeoDirectory › Fields |
| 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
GeoDirectory fields are defined per site and per listing type. There is no fixed schema to know in advance, which is why geodirectory/list-listing-fields is the call before any listing write: it returns the accepted keys, and each row’s name — its htmlvar_name — is what you write under.
Each row’s name is the key to write under, and it is also the database column name — GeoDirectory stores listing fields in a real table with real columns rather than in post meta.
That is why the field abilities are schema operations rather than settings, and why deleting a field destroys data.
The form-layout properties come back too: order, required, placement and placeholder. Those control how the add-listing form renders, which is what you need before changing the form rather than the data.
The default page size is the route maximum, because a caller asking for a schema almost always wants all of it. A type with more than a hundred fields needs paging.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
post_type | string | No | Listing type, for example gd_place. Defaults to the site default. See geodirectory/get-directory-overview for the valid values. |
location | string | No | Only fields shown in this output location. |
search | string | No | Free-text search across field titles. |
per_page | integer | No | Rows per page. Defaults to the route maximum. |
page | integer | No | Page number. |
What comes back
| Name | Type | What it is |
|---|---|---|
fields | array | Each field with its name, type, titles, requirement, ordering and placement. |
total | integer | How many fields the type has. |
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:
What fields can I set on a listing here?
It resolves to one call:
{
"ability": "geodirectory/list-listing-fields",
"parameters": {}
}Worth knowing
- The
nameis both the write key and the database column. - Fields differ per listing type. Read per type.
- The default page size is the route maximum, deliberately.
- Read-only.
Related abilities
- GeoDirectory Create Listing — what this is for
- GeoDirectory Manage Listing Field — change the schema
- GeoDirectory Get Listing Package — which of these a package allows
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category