Skip to main content
Glama
mapbox

Mapbox MCP Server

Official

Points Within Polygon

points_within_polygon_tool
Read-onlyIdempotent

Test geographic points against a polygon to return only those inside. Enables delivery zone validation, fleet geofencing, and customer segmentation offline.

Instructions

Test one or more geographic points against a polygon, returning only those inside. Handles a single point or a batch of points in one call. Useful for delivery zone validation, fleet geofencing, and customer segmentation. Works offline without API calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pointsYesArray of points to test against the polygon
polygonYesPolygon coordinates as array of rings (first is outer, rest are holes). Each ring is [longitude, latitude] pairs.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYesNumber of points inside the polygon
totalYesTotal number of input points tested
points_withinYesPoints that are inside the polygon
Behavior4/5

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

Annotations indicate readOnlyHint=true, idempotentHint=true, destructiveHint=false. The description adds that it 'handles a single point or a batch of points in one call' and 'works offline without API calls,' which provides useful behavioral context beyond the annotations. 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, each adding distinct value: purpose, batch capability, and use cases/offline nature. It is front-loaded with the core function and wastes no words.

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?

Given the simplicity of the tool and the presence of an output schema, the description covers essential aspects: purpose, batch handling, use cases, and offline operation. It could explicitly mention coordinate system (assumed WGS84), but overall it is sufficiently complete.

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 the schema already documents both parameters ('points' and 'polygon'). The description adds minimal extra meaning beyond echoing the schema (e.g., 'batch of points'). With full schema coverage, a baseline of 3 is appropriate as the description does not significantly enhance parameter understanding.

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 clearly states the tool's function: 'Test one or more geographic points against a polygon, returning only those inside.' The title 'Points Within Polygon' is also descriptive. It distinguishes itself from sibling tools like area_tool or distance_tool by focusing on point-in-polygon testing.

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?

The description provides explicit use cases: 'delivery zone validation, fleet geofencing, and customer segmentation' and notes that it 'works offline without API calls.' While it doesn't explicitly state when not to use it or give alternatives, the context is clear and sufficient for most scenarios.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mapbox/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server