Skip to main content
Glama
Mapbox MCP Server

Mapbox MCP Server

Official
by mapbox

Search and Geocode Tool

search_and_geocode_tool
Read-onlyIdempotent

Search for points of interest, brands, cities, towns, and addresses, then geocode results; add a proximity point to bias searches toward local matches.

Instructions

Search for POIs, brands, chains, geocode cities, towns, addresses. Do not use for generic place types such as 'museums', 'coffee shops', 'tacos', etc, because category_search_tool is better for that. Setting a proximity point is strongly encouraged for more local results. The underlying Search Box API is rolling out natural-language query understanding (e.g. 'quiet coffee shops with wifi near downtown'), so richer free-text phrasing in q can work well for category + place + attribute combinations — but as of this writing, big-box retail brand searches tied to a specific address (e.g. 'Costco near ', 'Walmart near ', 'Target near ') are unreliable and often return unrelated results; verify those results before relying on them.

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": {
      "q": "<q>"
    },
    "name": "search_and_geocode_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
qYesSearch query text. Limited to 200 characters (the API rejects longer queries with a 400, despite the docs stating 256). Supports natural-language phrasing combining category, place, and attributes (e.g. "quiet coffee shops with wifi near downtown Seattle"), though big-box retail brand + address queries (e.g. "Costco near <address>") are currently unreliable.
bboxNoBounding box to limit results within [minLon, minLat, maxLon, maxLat]
typesNoArray of feature types to filter results (e.g., ["poi", "address", "place"])
originNo
countryNoArray of ISO 3166 alpha 2 country codes to limit results
eta_typeNoRequest estimated time of arrival (ETA) to results
languageNoISO language code for the response (e.g., "en", "es", "fr", "de", "ja")
proximityNoLocation to bias results towards as {longitude, latitude}. If not provided, defaults to IP-based location. STRONGLY ENCOURAGED for relevant results.
poi_categoryNoArray of POI categories to include (e.g., ["restaurant", "cafe"])
auto_completeNoEnable partial and fuzzy matching
navigation_profileNoRouting profile for ETA calculations

Output Schema

NameRequiredDescriptionDefault
typeYes
featuresYes
attributionNo
mapboxRenderNoMap-payload reference for `render_map_tool`. Surfaced so the LLM can chain the next call without re-emitting geometry.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 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"
    • changedInput schema / properties / q / description
      Previous value: -"Search query text. Limited to 256 characters."New value: +"Search query text. Limited to 200 characters (the API rejects longer queries with a 400, despite the docs stating 256). Supports natural-language phrasing combining category, place, and attributes (e.g. \"quiet coffee shops with wifi near downtown Seattle\"), though big-box retail brand + address queries (e.g. \"Costco near <address>\") are currently unreliable."
    • changedInput schema / properties / q / maxLength
      Previous value: -256New value: +200
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / properties / mapboxRender
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Map-payload reference for `render_map_tool`. Surfaced so the LLM can chain the next call without re-emitting geometry.",
      +  "properties": {
      +    "ref": {
      +      "description": "Server-side payload reference. Pass to `render_map_tool` via `payload_refs: [\"<this ref>\"]` to display the data on a live Mapbox GL JS map, or, in ChatGPT Desktop, to the `redraw_map` tool of the open Mapbox map.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "ref"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.12.6

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld/idempotent/non-destructive, so the safety profile is covered. Beyond that, the description discloses a genuine reliability quirk — big-box brand + address queries often return unrelated results and must be verified — which is real behavioral context an agent cannot get from structured fields. It stops short of return format, result counts, or pagination behavior, keeping it below a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first two sentences are sharply front-loaded — purpose then exclusion — but the final sentence is long and substantially duplicates the caveat already spelled out in the q parameter description. It is informative rather than padded, yet the redundancy against the schema costs it a point on efficiency.

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 11 parameters, nested objects, an output schema, and full annotations, the description covers what the structured fields cannot: sibling routing and the brand-query unreliability. Nothing essential for a correct call appears to be missing, though a note on result volume or when to fall back to place_details_tool would round it out.

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 91%, so nearly every parameter is already documented in the schema, including the q 200-character limit and the proximity 'STRONGLY ENCOURAGED' note. The description largely restates the q phrasing guidance and proximity advice rather than adding new semantics for bbox, types, origin, country, or eta_type. Baseline 3 is appropriate when the schema does this much work.

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?

States specific verbs and resources — 'Search for POIs, brands, chains, geocode cities, towns, addresses' — which covers both the search and geocoding functions of the single tool. It then explicitly contrasts itself with category_search_tool, so an agent can pick correctly without opening either schema.

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?

Gives an explicit prohibition with a reason ('Do not use for generic place types such as museums, coffee shops... because category_search_tool is better') and names the winning alternative. It also adds actionable invocation guidance ('Setting a proximity point is strongly encouraged for more local results'), which is the practical selection criterion for result quality.

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