Skip to main content
Glama

Export GeoJSON

export_geojson

Exports the territory solution as one GeoJSON file to share, archive, or open in EasyTerritory Designer: territory polygons with part_ids, points, and routes with numbered stops, each carrying its displayed style. tal_ids, point_layers, and route_layers narrow it; include_points / include_routes omit a family. Input: map_session_id, ts_handle, or a completed build job_id. Returns a task whose result is geojson_artifact, share_url (key-less browser download for one hour; give the user share_with_user), and download_url (GET with the API key), never an inline body. Both serve a plain .geojson file. import_geojson reopens the file.

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": "export_geojson"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idNotask_id (same value as job_id) of a completed build or ingest task; its Territory Solution is the input.
tal_idsNoTALs to materialize; omit for all.
ts_handleNoTerritory Solution reference (tsh_...) from a build, ingest_accounts, import_geojson, import_designer_project, or get_map_visualization; Territory Solutions are not accepted inline.
point_layersNoPoint layers to include; omit for all.
route_layersNoroute_id values to include; omit for all. Each exported route emits one route_path feature plus one route_stop feature per visit (never coalesced).
include_pointsNo
include_routesNoSet false to drop the whole route family regardless of route_layers.
map_session_idNoOpen map session (msess_...) from get_map_visualization. Its Territory Solution is the input; omit ts_handle when set.

Output Schema

NameRequiredDescriptionDefault
okYes
errorNoPresent when ok is false.
resultNoPresent when ok is true. A submission returns the task reference (task_id, next_action, sleep_ms); the completed task result carries the remaining fields.
warningsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / result / description
      Previous value: -"Present when ok is true."New value: +"Present when ok is true. A submission returns the task reference (task_id, next_action, sleep_ms); the completed task result carries the remaining fields."
    • addedOutput schema / properties / result / properties
      Added value: +{
      +  "do_this_next": {
      +    "type": [
      +      "object",
      +      "string"
      +    ]
      +  },
      +  "download_url": {
      +    "type": "string"
      +  },
      +  "exported_at": {
      +    "type": "string"
      +  },
      +  "feature_count": {
      +    "type": "integer"
      +  },
      +  "geojson_artifact": {
      +    "type": "object"
      +  },
      +  "job_id": {
      +    "type": "string"
      +  },
      +  "next_action": {
      +    "type": "string"
      +  },
      +  "point_layers": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "share_url": {
      +    "type": "string"
      +  },
      +  "share_url_expires_at": {
      +    "type": "string"
      +  },
      +  "share_with_user": {
      +    "type": "string"
      +  },
      +  "sleep_ms": {
      +    "type": "integer"
      +  },
      +  "status": {
      +    "type": "string"
      +  },
      +  "tal_ids": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "task_id": {
      +    "type": "string"
      +  },
      +  "terminal": {
      +    "type": "boolean"
      +  },
      +  "ts_identity": {
      +    "type": "object"
      +  }
      +}
  2. Changed1 schema field changed
    • removedInput schema / properties / zip
      Removed value: -{
      -  "default": true,
      -  "description": "Default true stores/downloads gzip. Set false for uncompressed GeoJSON.",
      -  "title": "Zip",
      -  "type": "boolean"
      -}
  3. Changed12 schema fields changed
    • addedInput schema / properties / include_routes / description
      Added value: +"Set false to drop the whole route family regardless of route_layers."
    • addedInput schema / properties / job_id / description
      Added value: +"task_id (same value as job_id) of a completed build or ingest task; its Territory Solution is the input."
    • addedInput schema / properties / map_session_id / description
      Added value: +"Open map session (msess_...) from get_map_visualization. Its Territory Solution is the input; omit ts_handle when set."
    • addedInput schema / properties / point_layers / description
      Added value: +"Point layers to include; omit for all."
    • addedInput schema / properties / route_layers / description
      Added value: +"route_id values to include; omit for all. Each exported route emits one route_path feature plus one route_stop feature per visit (never coalesced)."
    • addedInput schema / properties / tal_ids / description
      Added value: +"TALs to materialize; omit for all."
    • addedInput schema / properties / ts_handle / description
      Added value: +"Territory Solution reference (tsh_...) from a build, ingest_accounts, import_geojson, import_designer_project, or get_map_visualization; Territory Solutions are not accepted inline."
    • addedInput schema / properties / zip / description
      Added value: +"Default true stores/downloads gzip. Set false for uncompressed GeoJSON."
    • 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.",
      +    "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: -"export_geojsonDictOutput"
  4. Changed1 schema field changed
    • removedInput schema / properties / guidance_handle
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Guidance Handle"
      -}
  5. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations (which only say non-readOnly, non-destructive, non-idempotent): it discloses that the call returns a task, that the result carries geojson_artifact/share_url/download_url, that share_url is key-less and expires in one hour while download_url needs the API key, and that no inline body is ever returned. That is exactly the operational context an agent needs to invoke and follow up on this tool.

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 the purpose, then filters, then inputs, then outputs — a logical order. It is dense but nearly every clause carries information; the only near-redundancy is restating the route feature/stop behavior that the schema already documents, and the dangling 'share_with_user' reference is slightly ambiguous.

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

Completeness4/5

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

An output schema exists and the description still covers the essential return contract (artifact vs. share_url vs. download_url) plus export composition and filtering, which is enough for an 8-parameter tool. Minor gap: the 'give the user share_with_user' instruction references something not defined in the schema or sibling list, leaving a small ambiguity.

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?

Schema coverage is already 88%, so the schema carries most parameter documentation, but the description adds a useful distinction: tal_ids/point_layers/route_layers 'narrow' the export while include_points/include_routes 'omit a family', which is a semantic layer beyond the field descriptions. It also clarifies that the three input identifiers are alternative entry points.

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?

States a specific verb and resource — exports a territory solution as a single GeoJSON file — and names the concrete payload (polygons with part_ids, points, routes with numbered stops). It is clearly distinguishable from siblings such as import_geojson, push_to_designer, and publish_to_dataverse.

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

Usage Guidelines4/5

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

Gives the intended contexts (share, archive, open in Designer) and states the accepted input entry points (map_session_id, ts_handle, or a completed build job_id). It also implies the reverse operation via 'import_geojson reopens the file', but never explicitly says when to prefer this over export-adjacent siblings like publish_to_dataverse or push_to_designer.

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