Skip to main content
Glama

Simplify geometry

simplify_geometry
Read-onlyIdempotent

Simplify GeoJSON geometry to fit a token budget while reporting lost detail. Automatically adjusts tolerance to preserve as much accuracy as possible.

Instructions

Simplify a GeoJSON geometry to fit a token budget, reporting what was lost.

Works on caller-supplied GeoJSON (Polygon, MultiPolygon, LineString,
MultiLineString; Points/MultiPoints pass through unchanged). Binary
searches the simplification tolerance until the result fits max_tokens
instead of asking the caller to guess one. Returns {"geometry": ...,
"max_deviation_m": ..., "original_points": N, "kept_points": M}, or a
structured {"error": "invalid_geometry", ...} for malformed input.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geojsonYes
max_tokensNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Install Server

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already indicate read-only, idempotent, non-destructive behavior. The description adds valuable behavioral context: binary search on tolerance, point geometries passing through unchanged, and a structured error response for invalid geometry. This goes well beyond the annotations.

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?

The description is front-loaded with the main purpose, then efficiently covers algorithm, input types, output shape, and error behavior. Every sentence earns its place; there is no filler or repetition.

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?

Given the output schema exists and annotations cover safety, the description is complete enough. It specifies valid input geometry types, pass-through behavior, the meaning of max_tokens, and error handling. Nothing critical is missing for invoking the tool correctly.

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 0%, so the description must carry parameter semantics. It explains max_tokens as the token budget and describes the binary-search behavior. It also clarifies which GeoJSON types are accepted. It could add more detail about geojson structure, but it compensates for the sparse schema well.

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 description uses a specific verb and resource: simplify a GeoJSON geometry to fit a token budget. It also states exactly which geometry types are handled and which pass through, clearly distinguishing this from sibling tools like geometry_op and render_map.

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?

The description gives clear context for when to use this tool: when a caller-supplied GeoJSON geometry needs to be simplified to fit a token budget. It does not explicitly name alternatives or say when not to use it, but the scope is specific enough that an agent can infer its niche.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chuofringer/placeroot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server