Build Mapbox Style JSON Tool
style_builder_toolGenerate and update Mapbox style JSON with automatic layer resolution using Streets v8 data. Control styling with layer actions, filters, and standard style config.
Instructions
Generate Mapbox style JSON for creating new styles or updating existing ones.
The tool intelligently resolves layer types and filter properties using Streets v8 data. You don't need exact layer names - the tool automatically finds the correct layer based on your filters.
BASE STYLES: • standard: ALWAYS THE DEFAULT - Modern Mapbox Standard with best performance • Classic styles: streets-v12/light-v11/dark-v11/satellite-v9/outdoors-v12/satellite-streets-v12/navigation-day-v1/navigation-night-v1 Only use Classic when user explicitly says "create a classic style" or working with existing Classic style
STANDARD STYLE CONFIG: Use standard_config to customize the basemap: • Theme: default/faded/monochrome • Light: day/night/dawn/dusk • Show/hide: labels, roads, 3D buildings • Colors: water, roads, parks, etc.
LAYER ORDERING: • Layers are rendered in order - last layer in the array appears visually on top • The 'slot' parameter is OPTIONAL - by default, layer order in the array determines visibility • For Standard style, you can optionally use 'slot' to control placement:
No slot (default): Above all existing layers in the style
'top': Behind Place and Transit labels
'middle': Between basemap and labels
'bottom': Below most basemap features
LAYER RENDERING: • render_type controls HOW to visualize the layer (line, fill, symbol, etc.) • Most important: Use render_type:"line" for outlines/borders even on polygon features • Default "auto" picks based on geometry, but override for specific effects:
Building outlines → render_type:"line" (not fill!)
Solid buildings → render_type:"fill" or "fill-extrusion" (3D)
Road lines → render_type:"line" (auto works too)
POI dots → render_type:"circle"
Labels → render_type:"symbol"
LAYER ACTIONS: • color: Apply a specific color • highlight: Make prominent • hide: Remove from view • show: Display with defaults
AUTO-DETECTION: The tool automatically finds the correct layer from your filter_properties. Examples: • { class: 'park' } → finds 'landuse' layer • { type: 'wetland' } → finds 'landuse_overlay' layer • { maki: 'restaurant' } → finds 'poi_label' layer • { toll: true } → finds 'road' layer • { admin_level: 0 } → finds 'admin' layer (for country boundaries) • { admin_level: 1 } → finds 'admin' layer (for state/province boundaries)
IMPORTANT LAYER NAMES: • Use "admin" for all boundaries (countries, states, etc.) • Use "building" (singular, not "buildings") • Use "road" for all streets, highways, paths
If a layer type is not recognized, the tool will provide helpful suggestions showing: • All available source layers from Streets v8 • Which fields are available in each layer • Examples of how to properly specify layers and filters
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layers | Yes | Layer configurations based on the mapbox-style-layers resource | |
| base_style | No | Base style template. ALWAYS use "standard" as the default for all new styles. Standard style provides the best performance and modern features. Only use Classic styles (streets/light/dark/satellite/outdoors/navigation) when explicitly requested with "create a classic style" or when working with an existing Classic style. | standard |
| style_name | No | Name for the style | Custom Style |
| global_settings | No | Global style settings | |
| standard_config | No | Configuration for the base Mapbox Standard style. These properties customize the underlying Standard style features - you can still add your own custom layers on top using the layers parameter. The Standard style provides a rich basemap that you can configure and enhance with additional layers. |