Points Within Polygon
points_within_polygon_toolTests single or batched geographic points against a polygon and returns only those inside, enabling delivery zone validation, fleet geofencing, and customer segmentation offline.
Instructions
Test one or more geographic points against a polygon, returning only those inside. Handles a single point or a batch of points in one call. Useful for delivery zone validation, fleet geofencing, and customer segmentation. Works offline without API calls.
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": {
"points": "<points>",
"polygon": "<polygon>"
},
"name": "points_within_polygon_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| points | Yes | Array of points to test against the polygon | |
| polygon | Yes | Polygon coordinates as array of rings (first is outer, rest are holes). Each ring is [longitude, latitude] pairs. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | Number of points inside the polygon | |
| total | Yes | Total number of input points tested | |
| points_within | Yes | Points that are inside the polygon |