Skip to main content
Glama

Buffer, merge, clip or simplify features

process_geometry
Read-onlyIdempotent

Use this when the user wants to apply one GIS operation to a set of features (an uploaded file, a link, inline GeoJSON, or a download link from another TerraLab answer) and get the result as a file: buffer every feature by radius_m, union (dissolve all features into one, or one per value of dissolve_field), intersection or difference with a second layer, clip to a second layer or to an area (place, place with radius_m, or bbox), simplify by tolerance_m, centroid of each feature, or area_length (adds area_m2, perimeter_m and length_m to each feature, geodesic). Overlays run in WGS 84 degrees; buffer, simplify and centroid in a local equidistant projection. Up to 20,000 features and 100,000 vertices (10,000 for buffer). Returns the feature count, geometry types, total area or length, a map and GeoJSON, KML, Shapefile zip, GeoPackage and CSV downloads. Not for one distance or the area of a shape drawn in the chat: that is measure. Not for reading or converting a file without changing its geometry: that is open_gis_file. Never use the user's current location unless they type it. Download links build their file when opened; no file is saved. Never pass these links to open_gis_file: list every format the user needs in formats, in this one call. TerraLab reads the file or link to answer and keeps no copy.

Input Schema

NameRequiredDescriptionDefault
urlNoA public http(s) link to the features, or a TerraLab download link from an earlier answer.
areaNoFor clip: the area to keep, as a bbox or a place with a radius (its bounding box is used). The place the user asks about, not the user's own location.
fileNoA file uploaded in the conversation (GeoJSON, KML, KMZ, GPX, zipped Shapefile, CSV or WKT).
titleNoName for the map and the output files.
formatsNoDownload formats. All five by default.
geojsonNoThe features as a GeoJSON FeatureCollection, Feature or geometry in WGS 84 (longitude, latitude).
radius_mNoFor buffer: the distance in metres (convert km or miles first).
with_urlNoFor intersection, difference and clip: a link to the second layer, or a TerraLab download link.
operationYesThe operation to apply.
with_fileNoFor intersection, difference and clip: the second layer, uploaded in the conversation.
tolerance_mNoFor simplify: the largest allowed shift of the outline in metres.
with_geojsonNoFor intersection, difference and clip: the second layer as GeoJSON in WGS 84. Only its polygons count.
dissolve_fieldNoFor union: dissolve into one feature per value of this field instead of one feature.

Output Schema

NameRequiredDescriptionDefault
codeNoError code, on errors only.
hintNoWhat to do next, on errors only.
messageNoError message, on errors only.
sourcesNoData sources and licences of the result.
downloadsNoDownload links; each builds its file when opened.
truncatedNo
totalFoundNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent/openWorld annotations: it discloses CRS handling per operation (WGS 84 for overlays, local equidistant for buffer/simplify/centroid), hard limits (20,000 features, 100,000 vertices, 10,000 for buffer), that download links are built lazily on open with no file saved, and that TerraLab keeps no copy. The 'no file is saved' and 'never pass these links to open_gis_file' notes are exactly the kind of behavior annotations cannot express.

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 trigger clause and every sentence carries information — operation list, CRS, limits, return payload, exclusions, link semantics. It is a single very dense run-on paragraph, though; the exclusion and call-shape rules would scan faster as separate sentences.

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 13-parameter tool with nested objects and an output schema, the description covers what an agent needs before calling: which inputs are accepted, which parameters go with which operation, coordinate system expectations, size ceilings, and what the downloads are. Return-value detail is duplicated only briefly and the output schema carries the rest.

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 100%, so the baseline is 3, but the description adds real cross-parameter semantics the schema cannot: radius_m is scoped to buffer, tolerance_m to simplify, dissolve_field to union (one feature per value vs. one feature), and area applies only to clip with place/radius/bbox forms. It does not restate the numeric bounds or formats enum, which it correctly leaves to the schema.

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 names the concrete verb (apply one GIS operation) and enumerates every operation the tool supports — buffer, union/dissolve, intersection, difference, clip, simplify, centroid, area_length — plus the input forms and the file output. It explicitly distinguishes itself from the two nearest siblings, measure and open_gis_file, so an agent can route without opening the 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?

Starts with an explicit 'Use this when...' trigger, then gives two explicit negative exclusions with the correct alternative named for each ('that is measure', 'that is open_gis_file'). It also adds a usage rule ('Never use the user's current location unless they type it') and a call-shape rule ('list every format the user needs in formats, in this one call').

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