ValidateStyleTool
Validate Mapbox style JSON against the Mapbox Style Specification
How to use it
ValidateStyleTool is exposed by the MCP Devkit Server MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the ValidateStyleTool tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install MCP Devkit Server
npx @anthropic-ai/dxt packOther tools in MCP Devkit Server (36)
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.
Identify layers with identical filters that could be consolidated
Calculated contrast ratio (e.g., 21 for black on white)
Create a new Mapbox access token with specified scopes and optional URL restrictions.
Create a new Mapbox style
Delete a style by ID
(array or string, required): Mapbox expression to validate (array format or JSON string)
(string or object, required): GeoJSON object or JSON string to validate
Get a single user feedback item by its unique ID.
List user feedback items with comprehensive filtering, sorting, and pagination options.
List Mapbox access tokens for the authenticated user with optional filtering and pagination.
List all styles for a Mapbox account
Eastern-most longitude
Northern-most latitude
Description of the issue
Object with expressionType, returnType, and depth
Minimum contrast ratio required for the level and font size
Western-most longitude
Southern-most latitude
The optimized Mapbox style
Whether the combination meets the specified WCAG level
JSON path to the problem (optional)
Generate preview URL for a Mapbox style using an existing public token
Array of suggestions (only included when contrast fails)
Remove layers that are exact duplicates
Remove layers with no visible properties (excluding background layers)
Remove sources not referenced by any layer
Retrieve a specific style by ID
"error", "warning", or "info"
Simplify boolean expressions (e.g., ["all", true] → true)
Object with type, feature count, geometry types, and bounding box
(string or object, required): Mapbox style to optimize (JSON string or style object)
How to fix the issue (optional)
Statistics including size savings and percent reduction
Update an existing style
Complete WCAG contrast requirements for all levels