Skip to main content
Glama

point_in_polygon

Test if a geographic coordinate falls inside a polygon boundary. Use for geofencing, area membership checks, and spatial validation.

Instructions

Get the full administrative hierarchy for a geographic coordinate.

Returns: { country, country_code (ISO 3166-1 alpha-2), region (state/province), county, city, suburb, neighbourhood }. Not all levels are present for every location — rural coordinates may return only country and region.

USE FOR: Territory assignment, tax region detection, locale/language inference, delivery zone validation, "what country is this coordinate in?". DO NOT USE: For reverse geocoding a street address — use reverse_geocode instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latYesLatitude. Range: -90 to 90.
lonYesLongitude. Range: -180 to 180.
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the return structure (object with fields like country, region) and notes that not all levels are present, adding value beyond the schema. However, it does not explicitly state this is a read-only operation, though it's implied.

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 and concise: a clear first sentence, a list of return fields, notes on variability, and grouped use cases. Every sentence adds value.

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 the tool's simplicity (2 parameters, no output schema, no annotations), the description fully covers purpose, return format, usage scenarios, and exclusions, making it complete for an AI agent.

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% with lat/lon ranges fully documented. The description does not add new parameter-level semantics beyond what the schema provides, so 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 clearly states 'Get the full administrative hierarchy for a geographic coordinate,' which is a specific verb+resource. It explicitly distinguishes from the sibling tool reverse_geocode by advising against using it for street addresses.

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?

The description provides explicit 'USE FOR' and 'DO NOT USE' sections, listing concrete scenarios like territory assignment and tax region detection, and directing users to reverse_geocode for street addresses.

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/algolayertechnologies/mapsi-mcp'

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