Skip to main content
Glama

check_overlap

Read-onlyIdempotent

Calculates overlap between two polygon layers in hectares and percentages, reporting key intersecting feature pairs for project area, protected area, or leakage-belt checks.

Instructions

Overlap between two polygon layers (e.g. project area vs. protected areas, other registered projects, leakage belt or reference region): hectares, percentage of each layer and the largest overlapping feature pairs. Reports 0 ha explicitly.

Args: path_a: First polygon layer (usually the project area). path_b: Second polygon layer. id_field_a: Attribute used to name features of layer A (optional). id_field_b: Attribute used to name features of layer B (optional). layer_a: Layer name inside a multi-layer file A (optional). layer_b: Layer name inside a multi-layer file B (optional). crs: Projected CRS to measure in (optional, equal-area by default). max_pairs: Maximum number of overlapping pairs to list (default 20).

Input Schema

NameRequiredDescriptionDefault
crsNo
path_aYes
path_bYes
layer_aNo
layer_bNo
max_pairsNo
id_field_aNo
id_field_bNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive, closed-world behavior, so the description's burden is small; it still adds real value by disclosing that 0 ha is reported explicitly, that results are measured in a projected equal-area CRS by default, and that pair listing is capped. It does not cover failure behavior (e.g. non-overlapping extents, unprojectable data).

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 first sentence front-loads the purpose and outputs, and the Args block is scannable with one line per parameter; nothing is padding. Minor redundancy in restating schema defaults (20, null) inside the Args lines.

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 an eight-parameter spatial tool with zero schema descriptions, the definition supplies purpose, use-case examples, all parameter meanings, and default projection behavior, while the output schema covers return values. Remaining gaps are secondary details like CRS format expectations and behavior on degenerate or empty geometries.

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 schema description coverage at 0%, the description carries the full burden and does so through an Args block covering all eight parameters, including non-obvious semantics such as id_field_a naming features of layer A, layer_a selecting a layer inside a multi-layer file, and crs defaulting to an equal-area projection. It stops short of specifying accepted CRS syntax or what the max_pairs cutoff does to reported totals.

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?

The description names a specific computation on a specific resource pair ('Overlap between two polygon layers') and enumerates the outputs (hectares, percentage of each layer, largest overlapping feature pairs). It is unambiguous and clearly distinct from siblings like area_by_stratum or compare_declared_area, but it never explicitly differentiates itself from them, leaving that inference to the agent.

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 parenthetical examples ('project area vs. protected areas, other registered projects, leakage belt or reference region') convey the intended contexts, which is genuinely useful, but they are examples of layer types rather than explicit use/when-not-use guidance. No alternative tool is named and no prerequisite or exclusion is stated.

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