Skip to main content
Glama
Mapbox MCP Server

Mapbox MCP Server

Official
by mapbox

Calculate Bounding Box

bbox_tool
Read-onlyIdempotent

Calculates the bounding box extent of any geometry, returning min and max longitude and latitude that enclose it. Works offline without API calls for points, lines, and polygons.

Instructions

Calculate the bounding box (extent) of any geometry. Returns the minimum and maximum longitude and latitude that encompass the geometry. 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": "bbox_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
geometryYesGeometry coordinates (Point, LineString, Polygon, or MultiPolygon)

Output Schema

NameRequiredDescriptionDefault
bboxYesBounding box as [minLon, minLat, maxLon, maxLat]

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 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"
    • changedOutput schema / properties / bbox / items
      Previous value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "number"
      -  }
      -]New value: +false
    • addedOutput schema / properties / bbox / maxItems
      Added value: +4
    • addedOutput schema / properties / bbox / minItems
      Added value: +4
    • addedOutput schema / properties / bbox / prefixItems
      Added value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "number"
      +  }
      +]
  2. First observedv0.12.6

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds one genuinely new behavioral fact — no network/API calls, implying no rate limits or latency — but the return-format sentence duplicates what the output schema already provides, and it says nothing about edge cases such as antimeridian-spanning geometries or empty inputs.

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, front-loaded with the operation, then the result, then the notable offline trait. No hedging, no repetition of the title, and the last sentence carries real decision value.

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?

For a single-parameter, fully documented pure function with an output schema, the description covers purpose and computation cost adequately; return values need not be re-explained. The only gap is guidance on choosing this over related geometry tools and on degenerate inputs.

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% and the schema already enumerates coordinate nesting for Point, LineString, Polygon and MultiPolygon, so the schema carries the parameter burden. The description's 'any geometry' adds only a slight generalization beyond the schema's enumerated types and does not clarify the coordinate-array convention, which remains the schema's job.

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 names a specific verb ('Calculate') and resource ('bounding box (extent) of any geometry') and even paraphrases the result as min/max longitude and latitude, so the operation is unambiguous. It does not name or contrast with any sibling (e.g., centroid_tool, convex_tool, area_tool), so an agent must infer the boundary from the name alone.

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

Usage Guidelines3/5

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

Usage is only implied by 'of any geometry' and the note that it 'works offline without API calls,' which signals a cheap local computation. There is no explicit when-to-use guidance, no statement of when-not-to-use, and no pointer to an alternative such as convex_tool for a tight hull or centroid_tool for a representative point.

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