Tools
These are the tools and parameters an agent sees, taken from the server with every toolset on. The descriptions are the ones the agent reads.
Tools that take a style accept it in one of three ways: as an object in style, as a URL in url,
or as a file in path, relative to the directory the server runs in.
Check styles and data
Section titled “Check styles and data”These tools are in the style toolset, which is on by default. They only read.
validate_style
Section titled “validate_style”Checks a MapLibre style against the MapLibre Style Specification and lists every problem, each with the path to the property it is about. Run it after editing a style. Pass the style as an object, a URL or a file path.
| Parameter | Type | Description |
|---|---|---|
style |
object | The style as a JSON object. |
url |
URL | URL of a style JSON document. |
path |
string | Path to a style JSON file, relative to the directory the server runs in. |
describe_style_spec
Section titled “describe_style_spec”Looks up a name in the MapLibre Style Specification: a layer type (like "fill"), a layer or root property (like "fill-extrusion-height" or "sky"), a source type (like "geojson") or an expression operator (like "interpolate"). Returns its documentation, type, default, allowed values, expression support and which MapLibre GL JS and MapLibre Native versions support it. Check here before using a property you are not sure exists in MapLibre, since Mapbox GL JS has properties that MapLibre does not.
| Parameter | Type | Description |
|---|---|---|
name |
string, required | The name to look up. |
describe_sources
Section titled “describe_sources”Reads the metadata of every source in a MapLibre style (TileJSON, PMTiles headers and GeoJSON data) and lists the source layers and fields each one provides. Then checks that every layer uses a source, source layer and fields that exist. Use it before writing layers against data you do not know. inspect_tile shows the values the fields take, and debug_layers says what each layer draws at a place. Pass the style as an object, a URL or a file path.
| Parameter | Type | Description |
|---|---|---|
style |
object | The style as a JSON object. |
url |
URL | URL of a style JSON document. |
path |
string | Path to a style JSON file, relative to the directory the server runs in. |
inspect_tile
Section titled “inspect_tile”Reads the vector tile of a source at a place and zoom, and lists each source layer with its number of features, their geometry types, the values of each field and a few example features. It also gives the zoom range of the source and the source layers its metadata lists that the tile lacks. Use it to learn the values data really has, like the classes of roads, before writing filters and expressions. The source is either the id of a source in the style you pass, or the URL of a vector source: a TileJSON URL like a Martin source, a PMTiles archive, or a tile URL with {z}, {x} and {y}. Reads MVT and MLT tiles.
| Parameter | Type | Description |
|---|---|---|
style |
object | The style as a JSON object. |
url |
URL | URL of a style JSON document. |
path |
string | Path to a style JSON file, relative to the directory the server runs in. |
source |
string | The id of a source in the style, or the URL of a vector source. Defaults to the only vector source of the style. |
center |
2 numbers | [longitude, latitude] of the place to read. Defaults to the center of the style or the source. |
zoom |
number, 0 to 24 | Zoom level of the tile. Defaults to the zoom of the style, or the highest zoom of the source. |
layer |
string | Only list this source layer. |
examples |
integer, 0 to 20 | How many example features to show for each source layer. Defaults to 3. |
debug_layers
Section titled “debug_layers”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.
| Parameter | Type | Description |
|---|---|---|
style |
object | The style as a JSON object. |
url |
URL | URL of a style JSON document. |
path |
string | Path to a style JSON file, relative to the directory the server runs in. |
center |
2 numbers | [longitude, latitude] of the place. Defaults to the center of the style. |
zoom |
number, 0 to 24 | Zoom level. Defaults to the zoom of the style. |
layers |
array of strings | Only check these layers, by id. Defaults to every layer. |
Look up the GL JS API
Section titled “Look up the GL JS API”describe_gl_js_api is in the gl-js toolset, which is on by default. It reads the type definitions of the GL JS version the server renders with, or fetches those of another version from jsDelivr.
describe_gl_js_api
Section titled “describe_gl_js_api”Looks up a class, method, option, event or function of MapLibre GL JS, like "Map", "Map#flyTo", "MapOptions.maxPitch", "click" or "addProtocol", in the type definitions that GL JS ships. Returns its signature, documentation, parameters, default and examples, and for a class or an options type, its members. Answers for the GL JS version this server renders with, or for another version, like the one a project uses. Check here before using a method or option you are not sure exists in MapLibre, since Mapbox GL JS has some that MapLibre GL JS does not.
| Parameter | Type | Description |
|---|---|---|
name |
string, required | The name to look up, like "Map#flyTo", "flyTo" or "MapOptions". |
version |
string | A GL JS version or range, like "5.6.0" or "5", whose type definitions are fetched from jsDelivr. Defaults to the version this server renders with. |
Render and compare
Section titled “Render and compare”These tools come with any of the renderer toolsets, gl-js, native and martin. The renderer parameter offers the renderers that are on, with the first as the default, and compare_renderers needs two of them. Rendering covers what each renderer needs.
render_style
Section titled “render_style”Renders a MapLibre style to a PNG image, so you can see what the style looks like, for example after changing it. Also reports what the renderer noticed, such as style errors, failed requests, and fonts and icons that are missing. Pass the style as an object, a URL or a file path. Without center, zoom or bounds, the camera stored in the style is used. For a view over 3D terrain, cameraPosition and lookAt place the camera in space, and the result gives the center, zoom, bearing and pitch of that view to store in the style.
| Parameter | Type | Description |
|---|---|---|
style |
object | The style as a JSON object. |
url |
URL | URL of a style JSON document. |
path |
string | Path to a style JSON file, relative to the directory the server runs in. |
renderer |
gl-js, native or martin |
The MapLibre renderer to draw with. Defaults to gl-js. |
center |
2 numbers | [longitude, latitude] of the map center. |
zoom |
number, 0 to 24 | |
bearing |
number | The compass direction at the top of the map, in degrees. |
pitch |
number, 0 to 85 | Tilt in degrees from looking straight down. |
bounds |
4 numbers | [west, south, east, north] to fit the map to, instead of center and zoom. |
cameraPosition |
3 numbers | [longitude, latitude, altitude in metres] of the camera, to place it in space instead of with center, zoom, bearing and pitch. Needs lookAt. |
lookAt |
2 numbers | [longitude, latitude] of the point on the ground that the camera at cameraPosition looks at, like a summit or a village. |
width |
integer, 64 to 2048 | Defaults to 800. |
height |
integer, 64 to 2048 | Defaults to 600. |
compare_styles
Section titled “compare_styles”Renders two versions of a MapLibre style at the same camera, and returns one image with the style before, the style after, and their differences in red. Use it after changing a style, to check that the change did what you meant and nothing else, at a few places and zoom levels. Pass each style as an object, a URL or a file path.
| Parameter | Type | Description |
|---|---|---|
before |
object, required | The style before the change. |
before.style |
object | The style as a JSON object. |
before.url |
URL | URL of a style JSON document. |
before.path |
string | Path to a style JSON file, relative to the directory the server runs in. |
after |
object, required | The style after the change. |
after.style |
object | The style as a JSON object. |
after.url |
URL | URL of a style JSON document. |
after.path |
string | Path to a style JSON file, relative to the directory the server runs in. |
renderer |
gl-js, native or martin |
The MapLibre renderer to draw both with. Defaults to gl-js. |
center |
2 numbers | [longitude, latitude] of the map center. |
zoom |
number, 0 to 24 | |
bearing |
number | The compass direction at the top of the map, in degrees. |
pitch |
number, 0 to 85 | Tilt in degrees from looking straight down. |
bounds |
4 numbers | [west, south, east, north] to fit the map to, instead of center and zoom. |
width |
integer, 64 to 1024 | Width of each of the three images. Defaults to 512. |
height |
integer, 64 to 1024 | Defaults to 384. |
compare_renderers
Section titled “compare_renderers”Renders one MapLibre style with two renderers, like MapLibre GL JS for the web and MapLibre Native for iOS and Android, and returns one image with both and their differences in red. Use it to check that a style looks the same everywhere it is used.
| Parameter | Type | Description |
|---|---|---|
style |
object | The style as a JSON object. |
url |
URL | URL of a style JSON document. |
path |
string | Path to a style JSON file, relative to the directory the server runs in. |
renderers |
2 of gl-js, native and martin |
The two renderers to compare. Defaults to ["gl-js","native"]. |
center |
2 numbers | [longitude, latitude] of the map center. |
zoom |
number, 0 to 24 | |
bearing |
number | The compass direction at the top of the map, in degrees. |
pitch |
number, 0 to 85 | Tilt in degrees from looking straight down. |
bounds |
4 numbers | [west, south, east, north] to fit the map to, instead of center and zoom. |
width |
integer, 64 to 1024 | Width of each of the three images. Defaults to 512. |
height |
integer, 64 to 1024 | Defaults to 384. |
Show maps
Section titled “Show maps”These tools are in the gl-js toolset, which is on by default. preview_style gives the user a link to a live map of a style, and render_page draws a page with whatever the page adds to its map. The user sees the map of show_map in clients that support MCP Apps, like Claude and VS Code.
preview_style
Section titled “preview_style”Gives the user a link to an interactive map of a style, served by this server on their machine, so there is no viewer page to write, no web server to start and no browser to open for them. Given a file, the map follows it and redraws when the file changes. Given the style as an object, the map shows a changed style when you pass it together with the link, as link. Pass the style as an object, a URL or a file path.
| Parameter | Type | Description |
|---|---|---|
style |
object | The style as a JSON object. |
url |
URL | URL of a style JSON document. |
path |
string | Path to a style JSON file, relative to the directory the server runs in. |
link |
string | A link that this tool gave before for a style passed as an object. The map there then shows this style, and a page that has it open redraws. |
render_page
Section titled “render_page”Loads a web page with a MapLibre map in a headless browser and returns a screenshot of it, so you can see a map together with the plugins, controls and code of its page, which render_style leaves out since a style cannot hold them. Also reports the errors and warnings of the page, the requests that failed and the camera of the map. Pass an HTML file, which is served together with the files in its folder, or the URL of a page. A page that keeps its map in window.map is drawn once that map has loaded everything, and script can then use the map, for example to move the camera before the screenshot.
| Parameter | Type | Description |
|---|---|---|
path |
string | Path to an HTML file, relative to the directory the server runs in. The page can load the files next to it. |
url |
URL | URL of a page, for example on a development server. |
script |
string | JavaScript to run in the page before the screenshot, like map.jumpTo({center: [7.66, 45.98], zoom: 12}). What it evaluates to is returned. |
width |
integer, 64 to 2048 | Defaults to 800. |
height |
integer, 64 to 2048 | Defaults to 600. |
show_map
Section titled “show_map”Shows the user an interactive MapLibre map in the chat, with GeoJSON layers and markers on an OpenFreeMap basemap. The user sees the map and you do not; to look at a map yourself, use render_style. Without center and zoom, the map fits the layers and markers. Needs a client that supports MCP Apps.
| Parameter | Type | Description |
|---|---|---|
layers |
array of objects | Defaults to []. |
layers[].type |
fill, line, circle, symbol, fill-extrusion or heatmap, required |
|
layers[].data |
object, required | A GeoJSON FeatureCollection, Feature or geometry. |
layers[].paint |
object | Paint properties for the layer type, like {"fill-color": "#d33"}. |
layers[].layout |
object | Layout properties for the layer type. |
markers |
array of objects | Defaults to []. |
markers[].position |
2 numbers, required | [longitude, latitude] |
markers[].label |
string | Shown in a popup when the user clicks the marker. |
markers[].color |
string | |
basemap |
liberty, bright, positron, dark or fiord |
The OpenFreeMap style to draw on. Defaults to liberty. |
center |
2 numbers | [longitude, latitude] of the map center. |
zoom |
number, 0 to 22 | |
bearing |
number | |
pitch |
number, 0 to 85 |
Martin
Section titled “Martin”martin_list_sources is in the martin toolset.
martin_list_sources
Section titled “martin_list_sources”Lists the tile sources, sprites, fonts and styles that a Martin tile server serves, with the URLs to put in a MapLibre style. Follow up with inspect_tile on the TileJSON URL of a tile source, to see its source layers, geometry types and the values of its fields.
| Parameter | Type | Description |
|---|---|---|
url |
URL | Base URL of the Martin server. Defaults to MARTIN_URL, or http://localhost:3000. |
Search the ecosystem
Section titled “Search the ecosystem”search_ecosystem and find_basemaps are in the ecosystem toolset, which is on by default. They read the catalog of Make with MapLibre at https://makewithmaplibre.com/catalog.json, fetched at most once a day, or the copy that MAPLIBRE_MCP_CATALOG_URL points to. Libraries and basemaps explains what they return.
search_ecosystem
Section titled “search_ecosystem”Searches Make with MapLibre (makewithmaplibre.com), a curated directory of what works with MapLibre: SDKs and framework bindings, GL JS plugins, routing and navigation, geocoding, styling and tiling tools, AI tools (MCP servers and agent skills), hosted APIs, the products built with MapLibre, and consultancies. Use it to pick an SDK for a platform or framework, find a plugin or a service, find a platform or data source to build on, or see which products use a library. Each result has its links and a page with more. Follow up with find_basemaps for style URLs to render.
| Parameter | Type | Description |
|---|---|---|
query |
string | Words that each result has to contain, like "react", "draw" or "routing". Leave it out to list the most prominent entries. |
kind |
sdk, plugin, routing, geocoding, styling, tiling, ai, service, product or consultant |
Only entries of this kind. ai is MCP servers and agent skills for MapLibre. plugin includes the routing and geocoding controls for MapLibre GL JS. routing, geocoding, styling and tiling include the hosted services of that kind, and service lists all of them. |
platform |
Web, iOS, Android, Desktop or Server |
Only entries that run on this platform. Hosted services and consultancies have no platform and are kept. |
limit |
integer, 1 to 50 | The most results to return. Defaults to 10. |
find_basemaps
Section titled “find_basemaps”Lists the basemaps in Make with MapLibre (makewithmaplibre.com): ready-made MapLibre styles from OpenFreeMap, Protomaps, MapTiler, Stadia Maps, VersaTiles and others, with their style URLs and whether they need an API key, plus raster and elevation tiles. Pass a style URL as url to render_style or compare_styles to see it, or start a style from it.
| Parameter | Type | Description |
|---|---|---|
query |
string | Words that each basemap has to contain, in its name, provider or description, like "dark", "satellite" or "openfreemap". |
free |
boolean | true for only the basemaps that need no API key, false for only those that do. |