Add documentation search tool for AI-powered doc discovery#73
Open
mattpodwysocki wants to merge 1 commit intomainfrom
Open
Add documentation search tool for AI-powered doc discovery#73mattpodwysocki wants to merge 1 commit intomainfrom
mattpodwysocki wants to merge 1 commit intomainfrom
Conversation
Implement search_mapbox_docs_tool following Google Developer Knowledge API approach for better AI assistance with Mapbox documentation. Features: - Search Mapbox documentation for specific topics - Return ranked, relevant sections (not entire corpus) - Filter by category (apis, sdks, guides, examples) - Configurable result limit (1-20, default 5) - 1-hour caching for performance - Relevance scoring and ranking algorithm - Context-aware excerpt extraction Implementation: - Fetches and parses docs.mapbox.com/llms.txt - Categorizes sections automatically - Calculates relevance scores based on query match - Returns structured output with excerpts and URLs - Comprehensive test suite with 12 tests covering: - Basic search functionality - Category filtering - Relevance ranking - Caching behavior - Error handling - Edge cases Technical details: - Input schema: query (required), category (optional), limit (optional) - Output schema: results array with title, excerpt, category, url, relevanceScore - Caching: In-memory with 1-hour TTL - All 548 tests passing Closes #68 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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
Implements
search_mapbox_docs_toolfollowing the Google Developer Knowledge API approach for enhanced documentation discovery.Changes
New Tool:
search_mapbox_docs_toolFeatures:
Input:
{ "query": "geocoding rate limits", "category": "apis", // optional "limit": 5 // optional, default 5 }Output:
{ "results": [ { "title": "Forward Geocoding", "excerpt": "...Rate limit: 600 requests per minute...", "category": "apis", "url": "https://docs.mapbox.com/...", "relevanceScore": 0.95 } ], "query": "geocoding rate limits", "totalResults": 3, "category": "apis" }Implementation Details
docs.mapbox.com/llms.txtTesting
✅ Comprehensive test suite with 12 tests:
✅ All 548 tests passing
Related
Closes #68
Part of enhanced documentation discovery initiative inspired by:
Next Steps
This is the first of 5 planned improvements: