listStates
Resolve a state or province name to its URL slug by retrieving paginated, filterable states, provinces, and regions for any country in the directory.
Instructions
List states / provinces / regions - Paginated enumeration of states/provinces/regions enabled on this site. The location_states table is country-agnostic - it holds US states, Canadian provinces, UK regions, and any other first-admin-level division for any country active on this site, distinguished by country_sn. Read-only source-of-truth for state slugs in search-result URLs.
Use when: resolving a state/province name ("California", "Ontario") to its state_filename slug (california, ontario) before constructing a search-result URL.
Pagination + filter/sort: standard. Useful filters: state_ln (full name), state_sn (2-letter code), state_filename (slug), country_sn (scope to one country - e.g. US, CA).
Returns: rows with location_id (PK - NO typo here, unlike cities), state_sn, state_ln, state_filename, country_sn.
System-critical table - create & delete deliberately omitted. States are seeded by BD as needed. Use updateState only for corrections.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "listStates"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Pagination cursor (use next_page from previous response) | |
| limit | No | Records per page (default 25, max 100) | |
| property | No | Column key to filter by (present on the response rows; a wrong name silently returns empty). For multi-condition AND, pass parallel arrays here and in `property_value`/`property_operator` — equal length, Nth entries paired. See Rule: Compound filters. | |
| order_type | No | Sort direction: ASC or DESC | |
| order_column | No | Column to sort by — a column key present on the response rows (a wrong name silently returns empty) | |
| property_value | No | Value to filter by; array to pair with a `property` array (same length). | |
| property_operator | No | Filter operator (word-form; symbol forms WAF-stripped). Single: eq, ne, lt, lte, gt, gte, like, not_like. CSV: in, not_in, between. Substring: contains, starts_with, ends_with (+not_). Date: year_eq, month_eq, day_eq (+not_), since_days, until_days. Length: length_eq, length_lt, length_gt, length_between. Null: is_set, is_not_set, is_null, is_not_null. Array to pair with a `property` array (same length). See Rule: Filter operators for value shapes. |