feat: add search_mapbox_docs_tool powered by Algolia#18
Merged
mattpodwysocki merged 4 commits intomainfrom Mar 31, 2026
Merged
Conversation
docs.mapbox.com will support a .md suffix on all pages, returning clean markdown instead of HTML. This makes fetched content significantly easier for LLMs to parse. - Add docFetcher.ts with toMarkdownUrl() and fetchDocContent() - Both get_document_tool and batch_get_documents_tool now try the .md URL first and fall back to the original URL if unavailable - Set MAPBOX_DOCS_HOST_OVERRIDE=docs.tilestream.net to test against the staging environment where .md is already live Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a new search_mapbox_docs_tool that queries the Algolia index behind docs.mapbox.com search. Returns ranked results with titles, anchor URLs, and content excerpts. LLMs can use this to find the right page before calling get_document_tool to fetch full content. The Algolia app ID, search-only API key, and index name are public credentials embedded in every docs.mapbox.com browser session. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ctufts
approved these changes
Mar 27, 2026
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.
Summary
search_mapbox_docs_tool— searches all Mapbox documentation via the Algolia index that powers the search box on docs.mapbox.comHow it works
The Algolia app ID, search-only API key, and index name are public credentials embedded in every docs.mapbox.com browser session. We POST a query to the Algolia search API and format the ranked hits as markdown.
Typical workflow for an LLM:
search_mapbox_docs_tool("add a marker to a map")→ get ranked results with URLsget_document_tool(url)→ fetch the full page content for the best matchExample output
🤖 Generated with Claude Code