Skip to main content
Glama

addPolygon

Draw a polygon on a 3D globe from geographic coordinates, with options for fill color, opacity, outline, and extrusion. Returns an entity ID for later removal.

Instructions

Draw a polygon area from geographic coordinate tuples. Returns { success, data: { entityId }, message? }; keep entityId for removeEntity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorNoFill color (CSS format)#3B82F6
labelNoPolygon label text
opacityNoFill opacity (0-1)
sessionIdNoTarget browser session ID for multi-browser routing (optional)
coordinatesYesPolygon outer ring coordinates [[lon, lat, height?], ...]
outlineColorNoOutline color#FFFFFF
clampToGroundNoWhether to clamp to ground
extrudedHeightNoExtruded height (meters), for 3D effect

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
errorNo
messageNo
successYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.139.19
    • addedInput schema / properties / coordinates / items / items
      Added value: +{
      +  "type": "number"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "entityId": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "entityId"
      +      ],
      +      "type": "object"
      +    },
      +    "error": {
      +      "type": "string"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  2. Changed6 schema fields changedv1.139.18
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / properties / coordinates / items / anyOf
      Removed value: -[
      -  {
      -    "items": [
      -      {
      -        "description": "Longitude in decimal degrees",
      -        "maximum": 180,
      -        "minimum": -180,
      -        "type": "number"
      -      },
      -      {
      -        "description": "Latitude in decimal degrees",
      -        "maximum": 90,
      -        "minimum": -90,
      -        "type": "number"
      -      }
      -    ],
      -    "maxItems": 2,
      -    "minItems": 2,
      -    "type": "array"
      -  },
      -  {
      -    "items": [
      -      {
      -        "$ref": "#/properties/coordinates/items/anyOf/0/items/0"
      -      },
      -      {
      -        "$ref": "#/properties/coordinates/items/anyOf/0/items/1"
      -      },
      -      {
      -        "description": "Optional height in meters",
      -        "maximum": 50000000,
      -        "minimum": -12000,
      -        "type": "number"
      -      }
      -    ],
      -    "maxItems": 3,
      -    "minItems": 3,
      -    "type": "array"
      -  }
      -]
    • addedInput schema / properties / coordinates / items / maxItems
      Added value: +3
    • addedInput schema / properties / coordinates / items / minItems
      Added value: +2
    • addedInput schema / properties / coordinates / items / prefixItems
      Added value: +[
      +  {
      +    "description": "Longitude in decimal degrees",
      +    "maximum": 180,
      +    "minimum": -180,
      +    "type": "number"
      +  },
      +  {
      +    "description": "Latitude in decimal degrees",
      +    "maximum": 90,
      +    "minimum": -90,
      +    "type": "number"
      +  },
      +  {
      +    "description": "Optional height in meters",
      +    "maximum": 50000000,
      +    "minimum": -12000,
      +    "type": "number"
      +  }
      +]
    • addedInput schema / properties / coordinates / items / type
      Added value: +"array"
  3. Changed15 schema fields changedv1.139.17
    • addedInput schema / properties / color / maxLength
      Added value: +64
    • addedInput schema / properties / color / minLength
      Added value: +1
    • addedInput schema / properties / coordinates / items / anyOf
      Added value: +[
      +  {
      +    "items": [
      +      {
      +        "description": "Longitude in decimal degrees",
      +        "maximum": 180,
      +        "minimum": -180,
      +        "type": "number"
      +      },
      +      {
      +        "description": "Latitude in decimal degrees",
      +        "maximum": 90,
      +        "minimum": -90,
      +        "type": "number"
      +      }
      +    ],
      +    "maxItems": 2,
      +    "minItems": 2,
      +    "type": "array"
      +  },
      +  {
      +    "items": [
      +      {
      +        "$ref": "#/properties/coordinates/items/anyOf/0/items/0"
      +      },
      +      {
      +        "$ref": "#/properties/coordinates/items/anyOf/0/items/1"
      +      },
      +      {
      +        "description": "Optional height in meters",
      +        "maximum": 50000000,
      +        "minimum": -12000,
      +        "type": "number"
      +      }
      +    ],
      +    "maxItems": 3,
      +    "minItems": 3,
      +    "type": "array"
      +  }
      +]
    • addedInput schema / properties / coordinates / items / description
      Added value: +"Coordinate tuple [longitude, latitude, optional height]"
    • removedInput schema / properties / coordinates / items / items
      Removed value: -{
      -  "type": "number"
      -}
    • removedInput schema / properties / coordinates / items / type
      Removed value: -"array"
    • addedInput schema / properties / coordinates / maxItems
      Added value: +10000
    • addedInput schema / properties / coordinates / minItems
      Added value: +3
    • addedInput schema / properties / extrudedHeight / maximum
      Added value: +100000
    • addedInput schema / properties / extrudedHeight / minimum
      Added value: +0
    • addedInput schema / properties / label / maxLength
      Added value: +200
    • addedInput schema / properties / opacity / maximum
      Added value: +1
    • addedInput schema / properties / opacity / minimum
      Added value: +0
    • addedInput schema / properties / outlineColor / maxLength
      Added value: +64
    • addedInput schema / properties / outlineColor / minLength
      Added value: +1
  4. Changed8 schema fields changedv1.139.14
    • changedInput schema / properties / clampToGround / description
      Previous value: -"是否贴地"New value: +"Whether to clamp to ground"
    • changedInput schema / properties / color / description
      Previous value: -"填充颜色(CSS 格式)"New value: +"Fill color (CSS format)"
    • changedInput schema / properties / coordinates / description
      Previous value: -"多边形外环坐标 [[lon, lat, height?], ...]"New value: +"Polygon outer ring coordinates [[lon, lat, height?], ...]"
    • changedInput schema / properties / extrudedHeight / description
      Previous value: -"拉伸高度(米),可用于创建立体效果"New value: +"Extruded height (meters), for 3D effect"
    • changedInput schema / properties / label / description
      Previous value: -"多边形标注文本"New value: +"Polygon label text"
    • changedInput schema / properties / opacity / description
      Previous value: -"填充透明度(0~1)"New value: +"Fill opacity (0-1)"
    • changedInput schema / properties / outlineColor / description
      Previous value: -"描边颜色"New value: +"Outline color"
    • addedInput schema / properties / sessionId
      Added value: +{
      +  "description": "Target browser session ID for multi-browser routing (optional)",
      +  "type": "string"
      +}
  5. First observedv1.139.4

TDQS

A3.8/5.0
Behavior4/5

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

The description explicitly states the return shape { success, data: { entityId }, message? } and instructs the agent to keep entityId for removeEntity, adding valuable lifecycle behavior beyond the annotations. Annotations are all false and don't contradict the description, though it omits side effects like render persistence or permission requirements.

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

Conciseness5/5

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

One concise, front-loaded sentence plus a compact return note. Every word earns its place, with no filler or repetition of schema details.

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?

For an 8-parameter tool, the description is short but compensates with a fully documented schema, explicit output contract, and entity lifecycle hint. The main missing contextual element is usage comparison, but the essential invocation details are covered.

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

Parameters3/5

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

Schema description coverage is 100% and each parameter already has detailed descriptions including defaults and ranges. The description only adds the context of 'geographic coordinate tuples', which is marginal, so the schema carries the semantic burden and baseline 3 applies.

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?

Description uses a specific verb 'Draw' and resource 'polygon area' from geographic coordinate tuples, clearly distinct from sibling tools like addPolyline or addMarker. The action is unambiguous and directly tied to the tool name.

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

Usage Guidelines2/5

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

No guidance is provided on when to use addPolygon versus alternatives like addGeoJsonLayer or addPolyline. It lacks preconditions, exclusions, or context about preferred use cases, so the agent receives no decision support.

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