Skip to main content
Glama
Mapbox MCP Server

Mapbox MCP Server

Official
by mapbox

Calculate Area

area_tool
Read-onlyIdempotent

Calculate the area of a polygon or multipolygon in square meters, kilometers, feet, miles, acres, or hectares using offline processing with no API calls.

Instructions

Calculate the area of a polygon or multipolygon. Supports various units including square meters, kilometers, acres, and hectares. Works offline without API calls.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "geometry": "<geometry>"
    },
    "name": "area_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
unitsNoUnit of measurement for areameters
geometryYesPolygon or MultiPolygon coordinates. Polygon: array of rings (first is outer, rest are holes). MultiPolygon: array of polygons.

Output Schema

NameRequiredDescriptionDefault
areaYesCalculated area
unitsYesUnit of measurement

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.18.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv0.12.6

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is fully covered. The description adds 'works offline without API calls,' which reinforces rather than extends that profile, and it says nothing further about computation behavior, precision, or edge cases such as self-intersecting rings.

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 short sentences with the core operation front-loaded and no filler. Every sentence contributes either purpose, capability, or execution context.

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?

With a full input schema, an output schema, and rich annotations, the description covers what it needs to: the operation, supported units, and offline execution. The main omission is any routing guidance relative to the many sibling geometry tools, which is a minor gap given the otherwise complete structured data.

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 the geometry format (rings, holes, multipolygon nesting) and the units enum are already documented in the schema. The description's unit list is only a partial and slightly loose restatement ('square meters, kilometers' versus the enum's meters/kilometers/feet/miles/acres/hectares), so it adds little beyond structured data.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Calculate the area of a polygon or multipolygon'), so the operation is unambiguous. It does not, however, distinguish this tool from nearby siblings such as length_tool, bbox_tool, or convex_tool, so an agent gets no explicit differentiation.

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

Usage Guidelines2/5

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

There is no statement of when to use this tool versus alternatives, and no prerequisites or exclusions are given. The only implicit guidance is that the input must be a polygon or multipolygon, which an agent could infer from the name alone.

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