Skip to main content
Glama

Duo Data Utilities: IBAN, VAT, ISIN Validation API

Point in polygon check, plus bounding box, centroid and area for GeoJSON

point_in_polygon
Read-onlyIdempotent

Point in polygon check and GeoJSON geometry: point-in-polygon with correct hole handling, bounding box, centroid, signed area in square metres, perimeter length, and ring winding order for a geometry supplied in the request. Accepts Polygon and MultiPolygon, and a GeoJSON Feature wrapping either. Area and length are geodesic on the WGS-84 ellipsoid, correct at any latitude; containment is planar in lon/lat. Price: $0.05 per successful call, paid over x402 (USDC on Base).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "geometry": "<geometry>"
    },
    "name": "point_in_polygon"
  }
}

Input Schema

NameRequiredDescriptionDefault
latNoPoint latitude; with lon, runs the containment test. Accepted: a number between -90 and 90.
lonNoPoint longitude; with lat, runs the containment test. Accepted: a number between -180 and 180.
opsNoComma-separated subset of contains,bbox,centroid,area,perimeter,winding. Default all. Accepted: comma-separated subset of contains, bbox, centroid, area, perimeter, winding.
geometryYesURL-encoded GeoJSON Polygon, MultiPolygon or a Feature wrapping one. At most 3072 characters and 2000 coordinate pairs. Accepted: valid GeoJSON.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / lat / type
      Previous value: -"string"New value: +[
      +  "number",
      +  "string"
      +]
    • changedInput schema / properties / lon / type
      Previous value: -"string"New value: +[
      +  "number",
      +  "string"
      +]
  2. Added

TDQS

A4/5.0
Behavior4/5

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

Beyond the readOnly/idempotent annotations, the description discloses genuinely non-obvious behavior: containment is planar in lon/lat while area and length are geodesic on WGS-84 and accurate at any latitude, plus holes are handled correctly. It also surfaces a mandatory operational fact the annotations cannot convey — payment of $0.05 per successful call via x402 in USDC on Base. It stops short of describing the response shape, so not a 5.

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 capability list is front-loaded and dense, then closes with the important caveat (planar vs geodesic) and the pricing constraint. The op enumeration is long but each item maps to a distinct computation, so little is wasted; a tighter grouping of the six ops would make it slightly more scannable.

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

Completeness3/5

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

With no output schema, the description carries the burden of return values, and it leaves clear gaps: the wire format of the result, the unit of perimeter length (only area is stated as square metres), and how winding order is expressed (CW/CCW vs signed degrees) are all unstated. For a multi-op computational tool with no output schema, an agent still has to guess what comes back.

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 coverage is 100%, so the baseline is 3, but the description adds real meaning: it enumerates the six op names in the same order as the ops parameter and explains that area/perimeter are geodesic while containment is planar, which tells the agent how each op behaves. It also clarifies that geometry may be a Feature wrapping the shape, which the schema only gestures at.

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 names the concrete operations (point-in-polygon with hole handling, bounding box, centroid, signed area, perimeter, winding order) against a specific resource type (Polygon/MultiPolygon or a Feature wrapping one). It is unmistakably a geometry utility and cannot be confused with siblings such as geo_distance or geohash_encode_decode.

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?

Usage is implied rather than stated: the geometry must be supplied in the request, lat/lon are needed for the containment test, and the supported geometry types are listed. There is no explicit when-to-use vs when-not guidance against alternatives, and no mention of how to narrow work via the ops parameter to avoid paying for unwanted computations.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.