Skip to main content
Glama

forest_loss_in_area

Read-onlyIdempotent

Calculates forest loss per year within an area of interest from a lossyear raster and reports raster coverage, so partial tiles are never misread as no loss.

Instructions

Forest loss per year inside an area of interest from a local "lossyear" raster (e.g. a Hansen Global Forest Change tile, where 1 = 2001 ... 24 = 2024). Pixel areas are geodesic for rasters in degrees. Also reports how much of the area the raster actually covers, so a partial tile is never read as "no loss".

Args: aoi_path: Polygon layer with the area of interest (project area, leakage belt...). lossyear_raster: Path to the GeoTIFF with loss years. aoi_layer: Layer name inside a multi-layer AOI file (optional). start_year: First year to include, e.g. 2015 (optional). end_year: Last year to include, e.g. 2024 (optional). base_year: Year added to the raster value (2000 for Hansen GFC).

Input Schema

NameRequiredDescriptionDefault
aoi_pathYes
end_yearNo
aoi_layerNo
base_yearNo
start_yearNo
lossyear_rasterYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, so the description is not burdened with the safety profile. It instead adds substantive traits the annotations cannot convey: geodesic pixel areas for degree-based rasters and the coverage fraction that prevents a partial tile from being misread as 'no loss'.

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?

Purpose and the key caveat are front-loaded before the Args block, and every line is doing work given the empty schema descriptions. The Args enumeration duplicates parameter names from the schema, but that duplication is justified at 0% coverage.

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?

An output schema exists, so return values need not be explained, and the description still flags the coverage-reporting output as the key safeguard. For a two-required-parameter geospatial tool it covers the essential semantics, missing only edge-case handling for out-of-range years or mismatched CRS.

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 description coverage is 0%, so the description must carry the parameter burden, and it does: each of the six parameters gets meaning, including the non-obvious base_year offset (2000 for Hansen GFC) and the optional aoi_layer for multi-layer files. It stops short of specifying path format or how start_year/end_year interact with base_year.

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?

First sentence states a specific verb and resource: forest loss per year inside an AOI computed from a local lossyear raster, with the raster encoding spelled out (1 = 2001 ... 24 = 2024). This is clearly distinct from siblings like area_by_stratum or data_completeness, which do not operate on a loss-year raster.

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 description implies the use case (project area, leakage belt) but never explicitly says when to pick this over data_completeness or compare_declared_area, nor does it state preconditions such as raster/AOI CRS compatibility. Usage is inferable rather than instructed.

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