·
Last changedVersion:
This version passed the hardening gate. Hardening applied 2 targeted changes and preserved all other text. Classified findings before hardening: 1. Classified findings closed: 0. Classified findings remaining: 1. Unclassified scanner findings remaining: 0. Review findings closed: 0. Review findings remaining: 10.
1
1
Expand | File | Group | Subtype | Severity | Status |
|---|---|---|---|---|---|
SKILL.md | Sensitive Data & Secret Exposure | Data exfiltration | Medium | Open |
1 finding
Expert guidance for AI assistants on using Mapbox search tools effectively. Covers tool selection, parameter optimization, and best practices for geocoding, POI search, and location discovery.
Best for: Specific places, addresses, brands, named locations
Use when query contains:
Don't use for: Generic categories ("coffee shops", "museums")
Best for: Generic place types, categories, plural queries
Use when query contains:
Don't use for: Specific names or brands
Best for: Converting coordinates to addresses, cities, towns, postcodes
Use when:
| User Query | Tool | Reasoning |
|---|---|---|
"Find Starbucks on Main Street" | search_and_geocode_tool | Specific brand name |
"Find coffee shops nearby" | category_search_tool | Generic category, plural |
"What's at 37.7749, -122.4194?" | reverse_geocode_tool | Coordinates to address |
"Empire State Building" | search_and_geocode_tool | Specific named POI |
"hotels in downtown Seattle" | category_search_tool | Generic type + location |
"Target store locations" | search_and_geocode_tool | Brand name (even plural) |
"any restaurant near me" | category_search_tool | Generic + "any" phrase |
"123 Main St, Boston, MA" | search_and_geocode_tool | Specific address |
"electric vehicle chargers" | category_search_tool | Industry category |
"McDonald's" | search_and_geocode_tool | Brand name |
Three ways to spatially constrain search results:
What it does: Biases results toward a location, but doesn't exclude distant matches
Use when:
Example:
Why this works: API returns SF pizza places first, but might include famous NYC pizzerias if highly relevant
Always set proximity when you have a reference location! Without it, results are IP-based or global.
What it does: Hard constraint - ONLY returns results within the box
Use when:
Example:
Why this works: Guarantees all hotels are within SF's downtown area
Watch out: Too small = no results; too large = irrelevant results
What it does: Limits results to specific countries
Use when:
Example:
Why this works: Finds Paris, France (not Paris, Texas)
Can combine: proximity + country + bbox or any combination of the three
| Scenario | Use | Why |
|---|---|---|
"Find coffee near me" | proximity | Bias toward user location |
"Coffee shops in downtown Seattle" | proximity + bbox | Center on downtown, limit to area |
"Hotels in France" | country | Hard country boundary |
"Best pizza in San Francisco" | proximity + country ["US"] | Bias to SF, limit to US |
"Gas stations along this route" | bbox around route | Hard constraint to route corridor |
"Restaurants within 5 miles" | proximity (then filter by distance) | Bias nearby, filter results |
category_search_tool only (1-25, default 10)
| Use Case | Limit | Reasoning |
|---|---|---|
Quick suggestions | 5 | Fast, focused results |
Standard list | 10 | Default, good balance |
Comprehensive search | 25 | Maximum allowed |
Map visualization | 25 | Show all nearby options |
Dropdown/autocomplete | 5 | Don't overwhelm UI |
Performance tip: Lower limits = faster responses
Filter by feature type:
| Type | What It Includes | Use When |
|---|---|---|
| Points of interest (businesses, landmarks) | Looking for POIs, not addresses |
| Street addresses | Need specific address |
| Cities, neighborhoods, regions | Looking for area/region |
| Street names without numbers | Need street, not specific address |
| Postal codes | Searching by ZIP/postal code |
| Districts, neighborhoods | Area-based search |
| Towns, villages | Municipality search |
| Country names | Country-level search |
Example combinations:
Default behavior: All types included (usually what you want)
What it does: Enables partial/fuzzy matching
| Setting | Behavior | Use When |
|---|---|---|
| Matches partial words, typos | User typing in real-time |
| Exact matching | Final query, not autocomplete |
Example:
<!-- cspell:disable -->Use for:
Don't use for:
This applies to Mapbox Geocoding API v5 / Search Box in browser apps — not only MCP tools.
Also debounce search inputs (clearTimeout + setTimeout) so every keystroke does not fire a geocode.
For local searches, set:
proximity (or bbox if strict boundary needed)For category searches, consider:
limit (match UI needs)format (json_string if plotting on map)For disambiguation, use:
country (when geographic context matters)types (when feature type matters)For travel-time ranking:
eta_type, navigation_profile, origin (costs API quota)Load these for deeper guidance on specific topics:
references/advanced-params.md — poi_category, ETA, format, and language parametersreferences/workflows.md — Common patterns: Near Me, Branded, Geocoding, Category+Area, Reverse, Route-Based, Multilingualreferences/optimization-combining.md — Performance optimization, combining tools, handling no results, category list resourceGet started with chainctlchainctl skill install public/mapbox/mapbox-search-patterns:latest
Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.
skills.cgr.dev/public/github.com/mapbox/skills/mapbox-search-patterns:latest
MIT
HARDENING.md
LICENSE
SKILL.md
evals/evals.json
references/advanced-params.md
references/optimization-combining.md
references/workflows.md