Skip to content

Commit f058da5

Browse files
committed
snapshot test
1 parent c52f030 commit f058da5

1 file changed

Lines changed: 70 additions & 34 deletions

File tree

test/tools/__snapshots__/tool-naming-convention.test.ts.snap

Lines changed: 70 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,35 @@ exports[`Tool Naming Convention > should maintain consistent tool list (snapshot
6464
},
6565
{
6666
"className": "StyleBuilderTool",
67-
"description": "Generate Mapbox style JSON for creating new styles or updating existing ones. Supports Mapbox Standard (default), Classic, and Blank base styles with full control over layers, expressions, and visual properties.
67+
"description": "Generate Mapbox style JSON for creating new styles or updating existing ones. Uses Mapbox Standard for all NEW styles, and preserves the base style type when working with EXISTING styles.
6868
6969
USAGE:
7070
1. Use this tool to generate style JSON configuration
7171
2. For NEW styles: Use the generated JSON with create_style_tool
7272
3. For EXISTING styles: Use portions of the JSON with update_style_tool to modify specific layers
7373
74+
BASE STYLE SELECTION:
75+
FOR NEW STYLES: ALWAYS use base_style: 'standard' unless user explicitly requests otherwise
76+
- Standard is the modern, recommended approach with best performance
77+
- Example: "Create a style showing toll roads"use 'standard'
78+
- Example: "Create a dark style showing parks"use 'standard' with dark theme config
79+
80+
FOR EXISTING STYLES: Auto-detect and preserve the current base style
81+
- If working on a Classic style (retrieved via retrieve_style_tool), keep using Classic
82+
- If working on a Standard style, keep using Standard
83+
- Look for 'imports' field to identify Standard styles
84+
7485
BASE STYLES:
75-
standard (default): Modern Mapbox Standard with imports, requires slot property
76-
streets/light/dark/satellite/outdoors: Classic styles (deprecated but supported)
77-
blank: Empty style for full customization
86+
standard (DEFAULT FOR NEW STYLES): Modern Mapbox Standard with imports, best performance
87+
streets/light/dark/satellite/outdoors: Classic styles (use only for existing Classic styles or explicit request)
88+
blank: Empty style for full customization (only when explicitly needed)
89+
90+
WHEN TO USE EACH BASE STYLE:
91+
"Create a style showing toll roads"base_style: 'standard'
92+
"Create a dark style with parks"base_style: 'standard' + standard_config: { theme: 'monochrome' }
93+
"Build a navigation style"base_style: 'standard'
94+
"Working on style cmfnxfroh..." (if it's Classic) → preserve its base_style
95+
"Create a streets-v11 style" (explicit request) → base_style: 'streets'
7896
7997
LAYER ORDERING:
8098
In ALL styles: Later layers in array render on top of earlier layers
@@ -118,26 +136,30 @@ The resource://mapbox-style-layers contains comprehensive documentation includin
118136
119137
AVAILABLE LAYER TYPES:
120138
water, waterway - Oceans, lakes, rivers
121-
landuse, parks - Land areas like parks, hospitals, schools
139+
landuse - General land use areas
140+
parks - Parks, cemeteries, golf courses (pre-filtered for class: park|cemetery|golf_course)
122141
buildings, building_3d - Building footprints and 3D extrusions
123-
ROAD TYPES (use these specific types for best results):
124-
- motorways - Highway/freeway roads (class: motorway)
125-
- primary_roads - Major roads (class: primary, trunk)
126-
- secondary_roads - Secondary roads (class: secondary)
127-
- streets - Local streets (class: street, street_limited)
128-
- paths - Walking/cycling paths (class: path, pedestrian)
129-
- railways - Rail lines
130-
- roads - Generic/all roads (avoid using - use specific types above instead)
142+
ROAD TYPES (each automatically includes the correct road classes):
143+
- road - Generic road layer for CUSTOM filtering (use for toll roads, bridges, tunnels, etc.)
144+
- motorways - Highways/freeways (includes: motorway, trunk)
145+
- primary_roads - Major arterial roads (includes: primary)
146+
- secondary_roads - Secondary & tertiary roads (includes: secondary, tertiary)
147+
- streets - Local/residential streets (includes: street, street_limited, residential, service)
148+
- paths - Pedestrian paths & walkways (includes: path, pedestrian)
149+
- railways - Rail lines (includes: major_rail, minor_rail, service_rail)
131150
country_boundaries, state_boundaries - Administrative borders
132-
place_labels, road_labels, poi_labels - Text labels
151+
place_labels - City/town/village labels (pre-filtered)
152+
road_labels - Street name labels
153+
poi_labels - Points of interest with icons
133154
landcover - Natural features like forests, grass
134-
airports - Airport features
135-
transit - Bus stops, subway entrances, rail stations (filter by maki: bus, entrance, rail-metro)
155+
airports - Airport features (runways, terminals)
156+
transit - Transit stops with icons (bus, subway, rail)
136157
137158
IMPORTANT FOR ROADS:
138-
Always use specific road layer types (motorways, primary_roads, etc.) instead of generic 'roads'
139-
Each road type automatically includes proper filters and zoom-based width interpolation
140-
Don't specify fixed widths - the tool automatically applies appropriate zoom-based scaling
159+
Use 'road' layer type for custom filtering (toll roads, bridges, tunnels, bike lanes, etc.)
160+
Use specific road types (motorways, primary_roads, etc.) for pre-filtered road classes
161+
Each specific road type automatically includes proper filters and zoom-based width interpolation
162+
The generic 'road' layer requires filter_properties for filtering
141163
142164
ACTIONS YOU CAN APPLY:
143165
color - Set the layer's color (roads will use smart defaults if not specified)
@@ -152,23 +174,37 @@ EXPRESSION FEATURES:
152174
Interpolated values - "Fade buildings in between zoom 14 and 16"
153175
154176
ADVANCED FILTERING:
155-
• "Show only motorways and trunk roads"
156-
• "Display only bridges, not tunnels"
157-
• "Show only paved roads"
158-
• "Display only disputed boundaries"
159-
• "Show only major rail lines, not service rails"
160-
• "Filter POIs by maki icon type (restaurants, hospitals, etc.)"
161-
• "Show only bus stops (transit layer with maki: bus)"
162-
• "Display subway entrances (transit with maki: entrance)"
177+
• "Show only motorways and trunk roads" - Use motorways layer type
178+
• "Display only toll roads" - Use road layer with filter_properties: { toll: true }
179+
"Display only bridges" - Use road layer with filter_properties: { structure: 'bridge' }
180+
"Show only tunnels" - Use road layer with filter_properties: { structure: 'tunnel' }
181+
"Show only paved roads" - Use road layer with filter_properties: { surface: 'paved' }
182+
"Show roads with bike lanes" - Use road layer with filter_properties: { bike_lane: ['left', 'right', 'both'] }
183+
"Display only disputed boundaries" - Use filter_properties: { disputed: 'true' }
184+
"Filter POIs by maki icon type" - Use poi_labels with filter_properties: { maki: 'restaurant' }
185+
"Show only bus stops" - Use transit layer with filter_properties: { maki: 'bus' }
186+
"Display subway entrances" - Use transit layer with filter_properties: { maki: 'entrance' }
163187
164188
COMPREHENSIVE EXAMPLES:
165-
• "Show only motorways that are bridges"
166-
• "Display major rails but exclude tunnels"
167-
• "Color roads: motorways red, primary orange, secondary yellow"
168-
• "Show only toll roads that are paved"
169-
• "Display only civil airports, not military"
170-
• "Show country boundaries excluding maritime ones"
171-
• "Color bus stops red and subway entrances blue (transit with different maki values)"
189+
"Color all roads differently":
190+
- Use motorways (red), primary_roads (orange), secondary_roads (yellow), streets (green), paths (purple)
191+
- Each layer type automatically includes the correct road classes
192+
"Show only toll roads" - Use road layer with filter_properties: { toll: true }
193+
"Show toll motorways" - Use road layer with filter_properties: { toll: true, class: ['motorway', 'trunk'] }
194+
"Display bridges" - Use road layer with filter_properties: { structure: 'bridge' }
195+
"Show paved roads" - Use road layer with filter_properties: { surface: 'paved' }
196+
"Display one-way streets" - Use road layer with filter_properties: { oneway: 'true', class: ['street'] }
197+
"Show roads with bike lanes" - Use road layer with filter_properties: { bike_lane: ['left', 'right', 'both', 'yes'] }
198+
"Show all labels" - Use place_labels, road_labels, poi_labels layers
199+
"Display boundaries" - Use country_boundaries and state_boundaries layers
200+
201+
IMPORTANT FOR ROAD FILTERING:
202+
The 'toll' property uses 'true' as a string value when present
203+
Structure values: 'none', 'bridge', 'tunnel', 'ford'
204+
Surface values: 'paved', 'unpaved'
205+
Bike lane values: 'left', 'right', 'both', 'yes', 'no'
206+
Oneway and dual_carriageway use string values: 'true' or 'false'
207+
Access can be 'restricted' when limitations exist
172208
173209
For detailed layer properties and filters, check resource://mapbox-style-layers
174210

0 commit comments

Comments
 (0)