Skip to main content
Glama

centroid_layer

Idempotent

Computes the geometric centroid of each feature in a vector layer using a metric CRS, returning a verified Point layer in the input CRS. Refuses inputs without a CRS.

Instructions

One point per feature: the geometric centroid, computed in a metric CRS.

Geographic-CRS inputs are measured in an estimated UTM zone (decision recorded in the manifest) and returned in the input CRS — a planar centroid of degree coordinates lands in the wrong place, quietly. The output is verified: same feature count, Point geometry, input CRS. Note the manifest's caveat: the centroid of a concave or multi-part feature can fall outside it. Inputs without a CRS are refused.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
input_pathYes
output_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Install Server

TDQS

A4.5/5.0
Behavior5/5

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

The description discloses several non-obvious behaviors beyond the annotations: the estimated-UTM fallback for geographic CRS, the risk of planar centroids of degree coordinates being wrong, the verification of output invariants, the caveat about centroids falling outside concave/multi-part features, and refusal of CRS-less inputs. This is rich, honest transparency with no contradiction to 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 one-sentence summary is front-loaded, and every subsequent sentence adds a distinct caveat or fact: CRS projection behavior, output verification, centroid-location caveat, and refusal condition. No filler or redundant phrasing.

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?

The description covers the critical behavioral risks, output guarantees, and input constraints. An output schema exists for return-value structure, and annotations cover idempotence and non-destructiveness. Nothing essential for selecting and correctly invoking this tool 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?

The schema has 0% description coverage, and the description does not explicitly define input_path or output_path. However, it does add meaning by explaining input CRS requirements, the output CRS behavior, and the refusal condition, which indirectly informs both parameters. Path parameters are also fairly self-descriptive, so the gap is moderate rather than severe.

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 opens with a precise, specific statement: 'One point per feature: the geometric centroid, computed in a metric CRS.' It clearly names the operation, the resource (a layer), and the output shape, making the tool's purpose unmistakable even among many geometry siblings.

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 operational context: geographic-CRS inputs are handled via an estimated UTM zone, inputs without a CRS are refused, and results are returned in the input CRS. It does not explicitly name alternatives or state when not to use this tool, but the conditions are concrete and actionable.

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/mapsmith-ai/mapsmith'

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