Skip to main content
Glama

compare_declared_area

Read-onlyIdempotent

Compare declared project or stratum hectares against areas calculated from a GIS layer, flagging differences above a specified tolerance.

Instructions

Compare areas declared in a project document (PD, monitoring report) with the areas calculated from the layer, and flag differences above a tolerance.

Args: path: Polygon layer with the project area or strata. declared_ha: Declared hectares, keyed by stratum value and/or "total", e.g. {"total": 8000, "dense_forest": 5200}. stratum_field: Attribute holding the stratum (needed for per-stratum keys). tolerance_pct: Accepted absolute difference in percent (default 1.0). layer: Layer name inside a multi-layer file (optional). crs: Projected CRS to measure in (optional, equal-area by default).

Input Schema

NameRequiredDescriptionDefault
crsNo
pathYes
layerNo
declared_haYes
stratum_fieldNo
tolerance_pctNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered. The description adds genuine behavioral context beyond that: the tolerance threshold concept, the default of 1.0, and the equal-area default CRS used for measurement. It doesn't say what a 'flag' looks like in the response, but the output schema carries that.

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?

The purpose sentence is front-loaded and the remaining content is a tight Args block with no filler. The docstring formatting is slightly mechanical, but every line carries information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter tool with a nested object argument and an output schema, this covers nearly everything needed to invoke it correctly, including the CRS/measurement concern. The main gap is that it doesn't say whether tolerance violations cause an error or are simply reported, though the output schema likely answers that.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the full burden, and it does: it explains path, the declared_ha keying convention with a concrete example ({"total": 8000, "dense_forest": 5200}), when stratum_field is required, what layer means for multi-layer files, and the meaning/default of crs and tolerance_pct. This is meaning an agent cannot get from the bare schema titles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: compare areas declared in a project document (PD, monitoring report) against areas calculated from the layer, and flag differences above a tolerance. That is far more than a restatement of the name. It does not explicitly distinguish itself from siblings such as area_by_stratum, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The context of use is implied by 'declared in a project document' versus 'calculated from the layer', which tells an agent this is a QA/validation step. However, there is no explicit when-to-use, no prerequisites (e.g. run area_by_stratum first), and no named alternatives or exclusions.

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