Skip to content

Add Documentation Search Tool for AI-powered doc discovery #68

@mattpodwysocki

Description

@mattpodwysocki

Context

Following the Google Developer Knowledge API approach, add a search tool that enables AI assistants to search Mapbox documentation for specific topics instead of loading the entire documentation corpus.

Motivation

Currently, the MCP server provides the entire Mapbox documentation via docs.mapbox.com/llms.txt as a single resource. While this works, it's not optimal for:

  • Finding specific information quickly
  • Reducing context window usage
  • Providing targeted, relevant documentation

Google's Developer Knowledge API demonstrates the value of searchable, granular documentation access.

Proposed Implementation

Create a new tool: search_mapbox_docs_tool

Input Schema:

  • query (string, required) - Search query (e.g., "geocoding rate limits")
  • category (string, optional) - Filter by category: "apis", "sdks", "guides", "examples"
  • limit (number, optional) - Max results to return (default: 5)

Output:

  • Array of matching documentation sections with:
    • Title
    • Relevant excerpt/snippet
    • Link to full documentation
    • Category/topic

Implementation approach:

  1. Parse existing llms.txt content
  2. Implement text/keyword search (simple first)
  3. Return ranked, relevant sections
  4. Cache parsed documentation for performance

Future enhancements:

  • Semantic/vector search
  • Re-ranking by relevance
  • Support for code example search

Acceptance Criteria

  • search_mapbox_docs_tool implemented with input schema
  • Parses and indexes llms.txt content
  • Returns relevant documentation sections
  • Includes tests (unit and integration)
  • Updates CHANGELOG.md
  • Documentation in README.md

Related

Part of enhanced documentation discovery initiative (Google-style approach)

References:

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions