You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -624,6 +625,53 @@ An array of four numbers representing the bounding box: `[minX, minY, maxX, maxY
624
625
- "Calculate the bounding box of this GeoJSON file" (then upload a .geojson file)
625
626
- "What's the bounding box for the coordinates in the uploaded parks.geojson file?"
626
627
628
+
#### compare_styles_tool
629
+
630
+
Compares two Mapbox styles and reports structural differences, including changes to layers, sources, and properties. This offline comparison tool performs deep object comparison without requiring API access.
631
+
632
+
**Parameters:**
633
+
634
+
-`styleA` (string or object, required): First Mapbox style to compare (JSON string or style object)
635
+
-`styleB` (string or object, required): Second Mapbox style to compare (JSON string or style object)
636
+
-`ignoreMetadata` (boolean, optional): If true, ignores metadata fields (id, owner, created, modified, draft, visibility) when comparing
637
+
638
+
**Comparison features:**
639
+
640
+
- Deep recursive comparison of nested structures
641
+
- Layer comparison by ID (not array position)
642
+
- Detailed diff reporting with JSON paths
643
+
- Identifies additions, removals, and modifications
644
+
- Optional metadata filtering
645
+
646
+
**Returns:**
647
+
648
+
```json
649
+
{
650
+
"identical": false,
651
+
"differences": [
652
+
{
653
+
"path": "layers.water.paint.fill-color",
654
+
"type": "modified",
655
+
"valueA": "#a0c8f0",
656
+
"valueB": "#b0d0ff",
657
+
"description": "Modified property at layers.water.paint.fill-color"
658
+
}
659
+
],
660
+
"summary": {
661
+
"totalDifferences": 1,
662
+
"added": 0,
663
+
"removed": 0,
664
+
"modified": 1
665
+
}
666
+
}
667
+
```
668
+
669
+
**Example prompts:**
670
+
671
+
- "Compare these two Mapbox styles and show me the differences"
672
+
- "What changed between my old style and new style?"
673
+
- "Compare styles ignoring metadata fields"
674
+
627
675
#### Style Optimization tool
628
676
629
677
Optimizes Mapbox styles by removing redundancies, simplifying expressions, and reducing file size.
0 commit comments