Skip to main content
Glama

geofence_contains

Read-onlyIdempotent

Tests one or more points for containment inside a polygon you supply as GeoJSON (Polygon, MultiPolygon, or a Feature/FeatureCollection wrapping one). Pure geometry against your own shape - it does not search a place index, so use explore or search_places to find what's near a point instead. Boundary points count as contained. Up to 1000 points per call, against a polygon of up to 100 rings/parts and 1000 positions per ring; larger inputs are rejected. Runs locally with no external lookup, but still counts as one metered request like other tools, so batch points into a single call rather than looping. Errors, rather than returning false, when the polygon is structurally invalid. Returns one boolean per point, in order, plus contained_count and point_count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pointsYesPoints to test ({ lat, lon } each), up to 1000
polygonNoA GeoJSON Polygon / MultiPolygon geometry, a Feature wrapping one, or a FeatureCollection

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultsYesOne containment boolean per input point (in order)
warningsNo
point_countYesNumber of points tested
contained_countYesHow many input points are contained

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

The description discloses several behaviors beyond the annotations: boundary points count as contained, structurally invalid polygons cause errors rather than false returns, and it runs locally with no external lookup yet still counts as a metered request. It also clarifies that it returns one boolean per point plus counts. No contradictions with readOnlyHint, openWorldHint, or idempotentHint.

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 well-structured, front-loading the core purpose and then systematically covering limits, behavior, error handling, and alternatives. Each sentence adds distinct value without redundancy, and the length is justified by the richness of behavioral details needed for correct usage.

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

Completeness5/5

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

Given that an output schema exists (though not shown here) and annotations cover safety and idempotency, the description addresses all critical aspects: inputs, limits, error behavior, batching, local execution, and alternative tools. Nothing an agent needs to invoke this tool correctly is missing.

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?

The input schema already fully describes both parameters with constraints (maxItems for points, GeoJSON types for polygon). The description adds context about limits and batching but does not introduce new parameter-specific semantics beyond what the schema provides. With 100% schema description coverage, a baseline of 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 states a specific verb ('tests') and resource ('points for containment inside a polygon you supply as GeoJSON'), and explicitly distinguishes itself from sibling tools by noting it does not search a place index and directing users to explore or search_places for proximity queries. This makes the tool's purpose unmistakable and differentiates it from similar tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states when to use the tool (testing containment against a user-supplied polygon) and when not to (finding places near a point), naming the alternative tools. It also provides operational guidance on batching points into a single call to avoid repeated metered requests, which is actionable and prevents misuse.

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