Geo search
geo_searchFinds rows nearest a longitude/latitude point using PostGIS distance, returning the closest matches; reports unavailable when PostGIS is not installed.
Instructions
Find the rows nearest to a lon/lat point by PostGIS distance. Reports available=false if the postgis extension is not installed.
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": {
"schema": "<schema>",
"table": "<table>",
"column": "<column>",
"longitude": "<longitude>",
"latitude": "<latitude>"
},
"name": "geo_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| table | Yes | ||
| column | Yes | ||
| schema | Yes | ||
| database | No | Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected. | |
| latitude | Yes | ||
| longitude | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| matches | Yes | ||
| available | Yes |