Skip to main content
Glama
Mapbox MCP Server

Mapbox MCP Server

Official
by mapbox

Simplify Geometry

simplify_tool
Read-onlyIdempotent

Reduce vertices in LineString or Polygon geometries with Douglas-Peucker simplification to shrink file sizes and improve rendering performance while preserving shape. Works offline without API calls.

Instructions

Simplify a LineString or Polygon by reducing the number of vertices while preserving the general shape. Uses the Douglas-Peucker algorithm. Useful for reducing file sizes and improving rendering performance. 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": {
      "geometry": "<geometry>"
    },
    "name": "simplify_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
geometryYesLineString or Polygon coordinates
toleranceNoSimplification tolerance (higher values = more simplification). Default: 0.01
highQualityNoUse high quality simplification (slower but more accurate). Default: false

Output Schema

NameRequiredDescriptionDefault
simplifiedYesSimplified geometry coordinates
originalVertexCountYes
reductionPercentageYes
simplifiedVertexCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.18.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / properties / simplified / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "items": [
      -        {
      -          "type": "number"
      -        },
      -        {
      -          "type": "number"
      -        }
      -      ],
      -      "type": "array"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "items": {
      -      "items": {
      -        "items": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "number"
      -          }
      -        ],
      -        "type": "array"
      -      },
      -      "type": "array"
      -    },
      -    "type": "array"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "items": false,
      +      "maxItems": 2,
      +      "minItems": 2,
      +      "prefixItems": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "number"
      +        }
      +      ],
      +      "type": "array"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "items": {
      +      "items": {
      +        "items": false,
      +        "maxItems": 2,
      +        "minItems": 2,
      +        "prefixItems": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "number"
      +          }
      +        ],
      +        "type": "array"
      +      },
      +      "type": "array"
      +    },
      +    "type": "array"
      +  }
      +]
  2. First observedv0.12.6

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world behavior, and the description largely restates the last point with 'Works offline without API calls'. It does add genuine value by naming the algorithm and the shape-preservation trade-off, but it never says precision is permanently lost or how aggressively vertices are dropped.

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?

Four short sentences with the core action front-loaded, then algorithm, then use case. The offline sentence duplicates the openWorldHint annotation and is the one piece that does not fully earn its place.

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?

With full annotation coverage, a complete input schema and an output schema, the description only needs to establish purpose and trade-offs — which it does. Nothing required to invoke the tool correctly is missing.

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%, with tolerance and highQuality both documented including defaults and the higher-values-means-more-simplification direction. The description adds nothing about tolerance units (degrees vs meters) or when to raise highQuality, so it does not exceed the schema baseline.

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 (simplify), the exact resource (LineString or Polygon), the mechanism (vertex reduction preserving shape) and the named algorithm (Douglas-Peucker). No sibling tool performs simplification, and the description makes that scope unmistakable.

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 clear use-case context — reducing file sizes and improving rendering performance — which tells an agent when the tool is worth reaching for. It stops short of explicit exclusions or naming alternatives, but no sibling overlaps in function, so the practical guidance is sufficient.

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