Skip to main content
Glama

Import GeoJSON

import_geojson

Opens 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

NameRequiredDescriptionDefault
geojsonNoGeoJSON 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_kindNoImport polygons without part_ids directly as an area layer (tal_kind=polygon), measured by point-in-polygon with no part_layer.
tal_labelNoLabel for the imported TAL when territory features lack TAL metadata.
part_layerNoGeography for overlay assignment (e.g. us_zips). Required with overlay_policy.
point_layerNoName for the imported point layer (default: points).
geojson_fileNoHost file parameter (openai/fileParams): an object with a temporary https download_url, or that URL as a string.
geojson_gzipNoBase64 gzip or zip bytes of a GeoJSON FeatureCollection.
geojson_textNo
upload_handleNoUpload link handle from import_geojson() with no file argument; returns its upload_status.
overlay_policyNoExplicit opt-in for converting territory polygons without part_ids into a part-based TAL: assigns parts whose centroids fall inside each polygon.

Output Schema

NameRequiredDescriptionDefault
okYes
errorNoPresent when ok is false.
resultNoPresent when ok is true.
warningsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / geojson_file / anyOf
      Previous value: -[
      -  {
      -    "oneOf": [
      -      {
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      {
      -        "additionalProperties": true,
      -        "properties": {
      -          "download_url": {
      -            "type": "string"
      -          },
      -          "file_id": {
      -            "type": "string"
      -          }
      -        },
      -        "type": "object"
      -      }
      -    ]
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "download_url": {
      +        "description": "Temporary HTTPS download URL from the host.",
      +        "type": "string"
      +      },
      +      "file_id": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / geojson_file / title
      Added value: +"Geojson File"
  2. Changed2 schema fields changed
    • changedInput schema / properties / overlay_policy / description
      Previous value: -"Explicit opt-in for importing territory polygons without part_ids: assigns parts whose centroids fall inside each polygon."New value: +"Explicit opt-in for converting territory polygons without part_ids into a part-based TAL: assigns parts whose centroids fall inside each polygon."
    • addedInput schema / properties / tal_kind
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Import polygons without part_ids directly as an area layer (tal_kind=polygon), measured by point-in-polygon with no part_layer.",
      +  "title": "Tal Kind"
      +}
  3. Changed14 schema fields changed
    • addedInput schema / properties / geojson / description
      Added value: +"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)."
    • changedInput schema / properties / geojson_file / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "oneOf": [
      +      {
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      {
      +        "additionalProperties": true,
      +        "properties": {
      +          "download_url": {
      +            "type": "string"
      +          },
      +          "file_id": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      }
      +    ]
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / geojson_file / description
      Added value: +"Host file parameter (openai/fileParams): an object with a temporary https download_url, or that URL as a string."
    • removedInput schema / properties / geojson_file / title
      Removed value: -"Geojson File"
    • addedInput schema / properties / geojson_gzip / description
      Added value: +"Base64 gzip or zip bytes of a GeoJSON FeatureCollection."
    • addedInput schema / properties / overlay_policy / description
      Added value: +"Explicit opt-in for importing territory polygons without part_ids: assigns parts whose centroids fall inside each polygon."
    • addedInput schema / properties / part_layer / description
      Added value: +"Geography for overlay assignment (e.g. us_zips). Required with overlay_policy."
    • addedInput schema / properties / point_layer / description
      Added value: +"Name for the imported point layer (default: points)."
    • addedInput schema / properties / tal_label / description
      Added value: +"Label for the imported TAL when territory features lack TAL metadata."
    • addedInput schema / properties / upload_handle / description
      Added value: +"Upload link handle from import_geojson() with no file argument; returns its upload_status."
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / properties
      Added value: +{
      +  "error": {
      +    "description": "Present when ok is false.",
      +    "properties": {
      +      "ask_user": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "code": {
      +        "type": "string"
      +      },
      +      "details": {
      +        "type": "object"
      +      },
      +      "do_this_next": {
      +        "type": "object"
      +      },
      +      "message": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "ok": {
      +    "type": "boolean"
      +  },
      +  "result": {
      +    "description": "Present when ok is true.",
      +    "properties": {
      +      "do_this_next": {
      +        "type": "string"
      +      },
      +      "imported_at": {
      +        "type": "string"
      +      },
      +      "summary": {
      +        "type": "object"
      +      },
      +      "ts_handle": {
      +        "type": "string"
      +      },
      +      "ts_identity": {
      +        "type": "object"
      +      },
      +      "upload_handle": {
      +        "type": "string"
      +      },
      +      "upload_status": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "warnings": {
      +    "items": {
      +      "properties": {
      +        "code": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "ok"
      +]
    • removedOutput schema / title
      Removed value: -"import_geojsonDictOutput"
  4. Changed2 schema fields changed
    • addedInput schema / properties / geojson_file
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Geojson File"
      +}
    • addedInput schema / properties / upload_handle
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Upload Handle"
      +}
  5. Changed1 schema field changed
    • removedInput schema / properties / guidance_handle
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Guidance Handle"
      -}
  6. First observed

TDQS

A4.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare the mutation profile (readOnlyHint=false, destructiveHint=false, openWorldHint=true, idempotentHint=false), so the description's job is to add operational behavior, which it does: the by-reference upload protocol, poll cadence, the INLINE_PAYLOAD_TOO_LARGE failure mode with the corrective call, and paint/style preservation on reimport. However, it does not say whether repeated calls create duplicate territory solutions (relevant given idempotentHint=false), which leaves the main behavioral risk unaddressed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then mechanics ordered by decision path (file vs inline vs upload), with no filler sentences. It is dense to the point of being terse in places (stacked parentheticals like curl_example and share_with_user), costing a bit of readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter import tool with an output schema, the description covers the input-path decision tree, size limits and failure recovery, the polygon-to-parts conversion option, and sibling routing. Nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

At 90% schema coverage the baseline is 3, and the description earns more by explaining parameter relationships the schema only hints at: geojson_file takes a host download_url, geojson/geojson_text/geojson_gzip are the size-limited inline path, upload_handle is the poll loop, and part_layer pairs with overlay_policy. Only tal_kind's polygon semantics get a lighter treatment than the schema's own description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb and resource (opens a GeoJSON FeatureCollection as a Territory Solution) plus the return values, and explicitly bounds accepted inputs (points, territory files, plain/gzip/zip). It names the sibling it is not (import_designer_project) so an agent can route without opening another schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit branch conditions: no file argument for large files → upload_url → poll upload_handle until upload_status=received; inline payloads capped at 256 KB; part_layer + overlay_policy="centroid_within" for converting part-less polygons; import_designer_project for Designer projects. The when/when-not split is unusually complete.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources