Repository navigation
Conversation
Adds mvt_preview_tool, registered as a file entrypoint for .mvt and .pbf (OpenAI MCP Extensions), and its page. The tool is app-only and never sees the file: the page reads it through the host with resources/read on the opaque URI it is given, unzips it if gzipped, and decodes it in the browser. Each layer is drawn in its own color, placed by the tile address in the file name or one the user enters, with feature counts, fields and a click to inspect a feature. The open file and selected feature are shared as model context. A file picker does the same outside ChatGPT. The decoder matches @mapbox/vector-tile on five real tiles (2759 features), including negative int64 values.
Asked to preview a tile, Codex decoded it with shell commands, since mvt_preview_tool was app-only and nothing pointed the model at it. The tool now also takes an absolute path from the model, and the page asks ChatGPT to open that file (openai/files/open), which lands in the same viewer through the file entrypoint. The server instructions route .mvt and .pbf files to it. Tested in ChatGPT Desktop (Codex): "preview this tile" with an attached file called mvt_preview_tool with the path, and the viewer opened with the tile.
zmofei
force-pushed
the
feat/chatgpt-tileset-explorer
branch
from
November 12, 2026 14:00
7f7a1af to
1a5b6ab
Compare
zmofei
force-pushed
the
feat/chatgpt-mvt-preview
branch
from
November 12, 2026 14:01
f4cad9d to
36f2616
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #335. Adds
mvt_preview_tooland its MCP App, so a local Mapbox Vector Tile file (.mvtor.pbf) opens in a Mapbox viewer in ChatGPT Desktop.{ type: "file", extensions: [".mvt", ".pbf"] }. Opening such a file from the thread calls it with an opaqueresourceUri; the page reads the file through the host (resources/read,representation: "blob"), unzips it if gzipped and decodes it in the browser. The server never reads the file.path, and the page asks ChatGPT to open it (openai/files/open), which lands in the same viewer. The server instructions route.mvtand.pbffiles to the tool; without that, Codex decoded the tile with shell commands.Verified:
@mapbox/vector-tileon five real Mapbox tiles (2,759 features), including negative int64 values..mvtin the thread outputs opens in the viewer, and "preview this tile" with an attached file calls the tool with the path and opens the viewer.Not verified: clicking an attached file in Sources opened a new chat instead of the viewer. One run showed an empty viewer after the model's call, and the cause was not found. Windows paths are not handled.