Skip to main content
Glama

geom_overlay

Read-onlyIdempotent

Combine two geometries using intersection, union, difference, or symmetric difference to calculate the resulting area, with automatic repair of invalid input polygons.

Instructions

Combine two geometries with a set operation, reporting the resulting area.

The workhorse of overlay analysis: how much of this delivery zone falls inside that flood extent (intersection), what is the combined footprint of these service areas (union), which part of a territory is not yet covered (difference).

Invalid input geometries are repaired automatically before the operation, since self-intersecting polygons are common in real data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geojson_aYesFirst geometry, as GeoJSON (object or string) or WKT.
geojson_bYesSecond geometry, as GeoJSON (object or string) or WKT.
operationNoThe set operation to apply.intersection

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
metaYes
geometryYes
measurementsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, covering the safety profile. The description adds a valuable behavioral detail: invalid geometries are auto-repaired before the operation, which is beyond the annotations and helps set expectations. It also clarifies the output is the resulting area, which is useful. No contradictions.

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 three sentences: the core function is front-loaded, followed by illustrative use cases, then a note on auto-repair. Every sentence earns its place with no redundancy. It is concise and well-structured.

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?

The tool has an output schema (per context signals), so return values are covered externally. The description covers purpose, use cases, and an important behavioral nuance (auto-repair). It does not explicitly mention symmetric_difference, but the schema lists it, so the description is complete enough for a 3-parameter tool with an output schema.

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?

Schema coverage is 100% per the context signals, so the schema already documents all three parameters with descriptions and enums. The description does not add parameter-specific details beyond what the schema provides, but it does mention the operation types in examples. Since the schema is thorough, the baseline 3 is appropriate.

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 explicitly states 'Combine two geometries with a set operation, reporting the resulting area.' It provides concrete examples (intersection, union, difference) and clearly differentiates this overlay tool from siblings like geom_measure or geom_relate. The verb+resource+outcome are specific and unambiguous.

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?

It gives real-world scenarios (delivery zone vs. flood extent, service area footprints, uncovered territory) that illustrate when to use this tool. However, it does not explicitly mention when NOT to use it or name alternative tools, so it falls short of a 5 but is still clear on context.

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