Skip to main content
Glama

Punto dentro de polígono

geo-point-in-polygon
Read-onlyIdempotent

Verifica si un punto está dentro de un polígono (con huecos opcionales), p. ej. zonas de entrega. Cuándo: hay que calcular coordenadas, distancias, rumbos o áreas a partir de puntos dados. No para: calcular el área y el perímetro de un polígono (geo-polygon-area). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Tests whether a point lies inside a polygon (ray casting on lon/lat, planar approximation; holes supported via additional rings), e.g. for delivery zones. When: coordinates, distances, bearings or areas have to be computed from given points. Not for: computing the area and perimeter of a polygon (geo-polygon-area). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.

Input Schema

NameRequiredDescriptionDefault
pointYesPoint as {lat, lon} in decimal degrees (WGS84) (object; required).
polygonYesRings: first outer, others holes; each ring is [[lon,lat],…] (array of array; required; at least 1 items; up to 100 items).

Output Schema

NameRequiredDescriptionDefault
insideNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / point / examples
      Added value: +[
      +  {
      +    "lat": 0.5,
      +    "lon": 0.5
      +  }
      +]
    • addedInput schema / properties / polygon / examples
      Added value: +[
      +  [
      +    [
      +      [
      +        0,
      +        0
      +      ],
      +      [
      +        1,
      +        0
      +      ],
      +      [
      +        1,
      +        1
      +      ],
      +      [
      +        0,
      +        1
      +      ],
      +      [
      +        0,
      +        0
      +      ]
      +    ]
      +  ]
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, non-destructive, idempotent, closed-world), and the description still adds real value on top: deterministic output, no network, no stored state, and hard limits (64 KB JSON input, 1 s per call, 1 MB result). The planar-approximation caveat is a meaningful accuracy disclosure an agent would not otherwise know.

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?

Front-loaded with the operation, then cleanly labeled sections (Cuándo / No para / Efectos secundarios / Determinista / Límites), which is easy to scan. The full Spanish and English renderings duplicate the same content, roughly doubling length without adding information an agent needs twice.

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 no explanation, and parameters, side effects and limits are all covered. The one meaningful gap is boundary behavior — whether a point exactly on an edge or vertex counts as inside — which is the classic ambiguity for point-in-polygon and is left unstated.

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 description coverage is 100%, so both parameters and the ring ordering ('first outer, others holes') are already documented in structured data. The description reinforces the holes-via-additional-rings convention and the lon/lat planar assumption, but adds nothing about coordinate order or input limits per ring beyond what the schema states. 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?

States a precise verb+resource: tests whether a point lies inside a polygon, including optional holes, with the algorithm named (ray casting on lon/lat, planar approximation). It explicitly distinguishes itself from the closest sibling (geo-polygon-area), so an agent can route without opening either schema.

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?

Provides an explicit 'Cuándo' / 'No para' pair and names the alternative tool (geo-polygon-area) with the condition that selects it. The positive 'when' clause is somewhat generic boilerplate shared across the geo suite ('coordinates, distances, bearings or areas'), which adds little discrimination, but the negative case is precise.

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.

Resources