Skip to main content
Glama

zonal_statistics

Idempotent

Calculate raster statistics for every vector zone with exact fractional pixel coverage, producing per-zone metrics like count, mean, min, and max for further analysis.

Instructions

Statistics of a raster within each vector zone (exact fractional pixel coverage).

stats: subset of count/sum/mean/median/min/max/stdev/variance/majority/minority/ variety (default: count, mean, min, max). Zones are aligned to the raster CRS automatically; the decision is recorded in the provenance manifest. Zones without a CRS are refused; warnings and repairs keys in the result flag a suspicious outcome or geometry MapSmith had to repair. Requires the [raster] extra.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statsNo
zones_pathYes
output_pathYes
raster_pathYes

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?

The description discloses important behaviors beyond the annotations: automatic CRS alignment with provenance recording, refusal of zones without CRS, result repair/warning keys, and the [raster] extra dependency. This gives an agent a realistic model of side effects and failure modes.

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 compact and well-organized: core purpose first, then stats options, then edge-case behavior. Every sentence adds operational value without redundancy.

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 raster/vector analysis tool with an output schema available, the description covers what the tool does, accepted stats, defaults, CRS handling, failure conditions, and installation prerequisite. Nothing essential is missing for a knowledgeable agent to invoke it safely.

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?

With 0% schema description coverage, the description compensates meaningfully by enumerating the valid stats values and the default set. The three path parameters are self-explanatory from the domain language, though the description does not provide file-format or coercion details for them.

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 clearly states the operation: computing raster statistics within vector zones, with the distinctive detail of exact fractional pixel coverage. It differentiates itself from sibling raster tools like hillshade or slope by focusing on zonal aggregation rather than surface derivation.

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 context of use is clear: summarizing a raster by vector zones, with specifics about how zones are handled. It does not explicitly name alternative tools or when-not-to-use conditions, but the raster/zone framing sufficiently implies the intended scenario.

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