Skip to main content
Glama
mapbox

Mapbox MCP Server

Official

Difference of Polygons

difference_tool
Read-onlyIdempotent

Subtract one polygon from another to find the area in polygon1 not covered by polygon2. Compute exclusion zones or uncovered service areas offline without API calls.

Instructions

Subtract one polygon from another, returning the area in polygon1 that is not covered by polygon2. Useful for computing exclusion zones, finding uncovered service areas, or "what is in zone A but not zone B?". Returns null geometry if polygon2 fully covers polygon1. Works offline without API calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
polygon1YesThe polygon to subtract from
polygon2YesThe polygon to subtract

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
geometryYesGeoJSON geometry of the remaining area (polygon1 minus polygon2), or null if polygon2 fully covers polygon1
has_differenceYesWhether any area remains after subtracting polygon2 from polygon1
Behavior5/5

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

Adds critical behavioral details beyond annotations: null geometry return when polygon2 fully covers polygon1, and offline operation. No contradiction with readOnlyHint=true or other annotations.

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?

Three concise sentences: operation, use cases, behavior. Front-loaded with main action. No fluff.

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?

Covers all key aspects: operation purpose, usage scenarios, edge case (null return), and offline capability. Output schema exists so return format is handled. Complete for agent decision-making.

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 clear descriptions for both parameters. Description reinforces which polygon is the base and which is subtracted, but does not add significant new meaning beyond schema.

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?

Description clearly states 'Subtract one polygon from another' with specific verb-resource pairing. Examples of exclusion zones and uncovered service areas distinguish it from sibling tools like intersect_tool and union_tool.

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 use cases ('computing exclusion zones, finding uncovered service areas') and behavior notes ('returns null if fully covered'). Lacks explicit contrast with siblings like intersect_tool, but context is sufficient for most agents.

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