Import GeoJSON
import_geojsonOpens a GeoJSON FeatureCollection (points, or a territory file, plain or gzip/zip) as a Territory Solution; returns ts_handle and a summary. A file of any real size moves by reference, never inline: call with no file argument for an upload_url (give the user share_with_user, or POST it with curl_example), then poll import_geojson(upload_handle) every recommended_poll_delay_ms until upload_status=received. geojson_file takes a host file (download_url). Inline geojson / geojson_text / geojson_gzip take at most 256 KB; a larger one returns INLINE_PAYLOAD_TOO_LARGE with the upload_url call to make. Polygons without part_ids import as polygon areas with tal_kind="polygon" (measured by point-in-polygon), or convert to parts with part_layer + overlay_policy="centroid_within". For a Designer project, use import_designer_project.
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": "import_geojson"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| geojson | No | GeoJSON FeatureCollection: point features and/or EZT-exported territory features carrying part_ids. Incoming properties.style (color / opacity / size / shape / weight) on features and point_layers[] / route_layers[] is kept as-is; only missing paint is filled, so a reopened export paints exactly as saved (ts-reference.schema.json#/$defs/style). | |
| tal_kind | No | Import polygons without part_ids directly as an area layer (tal_kind=polygon), measured by point-in-polygon with no part_layer. | |
| tal_label | No | Label for the imported TAL when territory features lack TAL metadata. | |
| part_layer | No | Geography for overlay assignment (e.g. us_zips). Required with overlay_policy. | |
| point_layer | No | Name for the imported point layer (default: points). | |
| geojson_file | No | Host file parameter (openai/fileParams): an object with a temporary https download_url, or that URL as a string. | |
| geojson_gzip | No | Base64 gzip or zip bytes of a GeoJSON FeatureCollection. | |
| geojson_text | No | ||
| upload_handle | No | Upload link handle from import_geojson() with no file argument; returns its upload_status. | |
| overlay_policy | No | Explicit opt-in for converting territory polygons without part_ids into a part-based TAL: assigns parts whose centroids fall inside each polygon. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | No | Present when ok is false. | |
| result | No | Present when ok is true. | |
| warnings | No |