Tilequery: describe_tileset + tilequery tools, starting with elevation along a route
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- typescript
- Domain
- api, backend-api-design
Research direction
Start by reading the existing directions tool and the linked devkit tilequery implementation; the issue names no repository files or tests. The proposal spans TileJSON discovery, tile queries, built-in tileset notes, and route elevation, with open questions about duplication, defaults, permissions, and accuracy. Done means those choices are resolved and the requested tools and route profile work with documented elevation limits.
Written by the indexing model from the issue text.
Description
Problem
Some questions need data that's in Mapbox tilesets but not behind any tool in this server:
- "How high is this point?" and "How hilly is this bike route?" (terrain)
- "How tall is this building?" (Streets v8
building.height) - "Is this spot in a park or an industrial area?" (Streets v8
landuse.class) - "Which of our sales territories is this address in?" (a customer's own tileset)
mcp-devkit-server has a generic tilequery_tool, but a model can only use it well if it already knows the tileset id, layer names and fields. Most models outside a developer setting don't.
Proposal
1. describe_tileset_tool
Takes a tileset id and returns its layers, with field names, geometry type and zoom range, read from the tileset's TileJSON. TileJSON already carries this. For example:
mapbox.mapbox-streets-v8: 16 layers.building:height,min_height,underground,extruderoad:class,lane_count,bike_lane,accesslanduse:class,typenatural_label:elevation_m
mapbox.mapbox-terrain-v2:contour(ele,index),landcover,hillshade
It's cheap and cacheable, and it works on the user's own tilesets too.
2. tilequery_tool
Tilequery API: tileset, point, radius, layers, limit, geometry type. It returns only the matched features' properties and distances, not full geometry, to keep results small. Its result includes a mapboxRender.ref so the hits can go on the map.
3. Built-in notes for Mapbox-owned tilesets
A few lines in the tool descriptions for Streets v8, Terrain v2 and Traffic v1: what each is good for, and the fields TileJSON leaves out. For example, Traffic v1's TileJSON lists no fields, but its tiles carry congestion, class and structure (checked against a live tile while working on #278). With these, common questions don't need a describe call first.
4. First use case: elevation along a route
A tool built on top of the two above. It takes a directions_tool ref or a line, samples points along it against the terrain tileset, and returns:
- total climb and descent
- the highest and lowest points
- a small profile the map could chart
It's a clear gap today (this server has no elevation at all), and it pairs well with routes on the map. A single point's elevation falls out of the same work.
Open questions
- Duplication with devkit. Do we copy devkit's
tilequery_toolhere, move it here and keep devkit for developer and admin work, or share the code? - On by default? Two more general tools add to tool-selection load. Off by default, at least for the hosted connector? Run the tool-selection eval (#274) either way.
- Listing tilesets. Listing a user's own tilesets needs the broader
tilesets:listtoken permission. Leave listing to devkit, and have users name the tileset? - Terrain precision. Vector contours come in fixed elevation steps. Check what tilequery gives on Terrain v2 versus the terrain DEM before promising elevation accuracy.
- Resource too? Claude Desktop and ChatGPT don't let the model read resources on its own, so describe has to be a tool. Should it also be a
mapbox://tilesets/{id}resource for hosts that do support reading them?
- Dominant language
- TypeScript
- Stars
- 363
- Forks
- 45
- Avg merge
- 22h 36m
- Merged PRs (30d)
- 20
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mapbox/mcp-server
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
mapbox/mcp-server#302 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
mapbox/mcp-server#301 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
mapbox/mcp-server#300 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
mapbox/mcp-server#299 ·
Maintainers usually reply within 1 day
-
render_map_tool: smaller map ideas (isochrone slider, 3D tilt, night lighting, traffic refresh)Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 42/100
mapbox/mcp-server#288 ·
Maintainers usually reply within 1 day
All issues in mapbox/mcp-server
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
openremote/openremote#3487 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
coollabsio/jean#867 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ehmpathy/rhachet-roles-bhuild#616 ·
Maintainers usually reply within 1 day
-
📘 Docs supabase/cli
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
bug(cli): theme file home-directory check uses startsWith (sibling dirs pass, Windows casing fails)Openarea/core kind/bug priority/p2 status/bot-triaged
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
google-gemini/gemini-cli#29955 · 2 comments ·
Maintainers usually reply within 1 day