Skip to main content
Glama

Debug layers

debug_layers
Read-only

Diagnose why map layers draw nothing at a given place and zoom, checking visibility, zoom range, filters, opacity, icons, glyphs, and tile source data.

Instructions

Says for each layer of a style whether it draws anything at a place and zoom, and when it draws nothing, why: it is hidden or outside its zoom range, the tile lacks its source layer, its filter matches no feature (listed with the values the tile has), a fill layer gets no polygons, its opacity, width or size is 0 or its color transparent, or icons are missing from the sprite. It also notes text that GL JS draws with local fonts and MapLibre Native leaves out, because the style has no glyphs URL or the glyph server lacks its font stack. It reads the vector tiles and GeoJSON data at the place. Use it when a layer draws nothing. Pass the style as an object, a URL or a file path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoURL of a style JSON document.
pathNoPath to a style JSON file, relative to the directory the server runs in.
zoomNoZoom level. Defaults to the zoom of the style.
styleNoThe style as a JSON object.
centerNo[longitude, latitude] of the place. Defaults to the center of the style.
layersNoOnly check these layers, by id. Defaults to every layer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare readOnlyHint and openWorldHint; the description adds substantial behavior: it reads vector tiles and GeoJSON at the place, enumerates the failure causes it detects (hidden, out of zoom, missing source-layer, filter match, fill geometry, opacity/width/size/color, sprite icons), and flags GL JS vs MapLibre Native text differences from missing glyphs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and dense with useful detail, but the second sentence is a long run-on list of causes that could be trimmed or split for faster scanning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the return-value burden and does so by describing the per-layer verdict and reasons reported, and the GL JS/MapLibre text caveat. An agent has enough to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds meaning beyond the schema by clarifying that the style may be supplied as an object, a URL, or a file path (i.e., the style/url/path params are alternatives), and that the data is read 'at the place'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: reports, per style layer, whether it draws anything at a place/zoom and the reason when it does not. It enumerates the diagnostic categories, making it clearly distinct from siblings like validate_style or inspect_tile.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit triggering context ('Use it when a layer draws nothing') and the input forms to pass. It does not name an alternative sibling such as inspect_tile for the case where a layer draws something unexpected, so it stops short of full when/when-not routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.