Skip to content

Conversation

@mattpodwysocki
Copy link
Contributor

Summary

Resolves #69

Replaces the monolithic resource://mapbox-documentation with five focused, category-specific resources for better performance and organization:

  • resource://mapbox-api-reference - REST API documentation
  • resource://mapbox-sdk-docs - SDK and client library documentation
  • resource://mapbox-guides - Tutorials, how-tos, and guides
  • resource://mapbox-examples - Code examples and API playgrounds
  • resource://mapbox-reference - Reference materials (tilesets, data products, etc.)

This allows AI assistants and MCP clients to fetch only the documentation category they need, improving:

  • Performance: Smaller payloads, faster responses
  • Relevance: Get exactly the docs you need for the task
  • Context efficiency: Reduce token usage in AI conversations

The original resource://mapbox-documentation is kept for backward compatibility with a deprecation notice.

Implementation

  • Created shared docParser utility (src/resources/utils/docParser.ts) for parsing and categorizing documentation sections
  • Implemented 5 new resource classes, each filtering to its specific category
  • Registered all resources in resourceRegistry.ts
  • Added deprecation notice to original MapboxDocumentationResource
  • Comprehensive test coverage for parser and resources

Test Results

  • All 553 tests passing
  • New tests added:
    • test/resources/utils/docParser.test.ts - 12 tests for parser utility
    • test/resources/mapbox-api-reference-resource/MapboxApiReferenceResource.test.ts - 5 tests for resource class

Breaking Changes

None - the original resource://mapbox-documentation continues to work for backward compatibility.

🤖 Generated with Claude Code

Replaces the monolithic resource://mapbox-documentation with five focused resources for better performance and organization:

- resource://mapbox-api-reference - REST API documentation
- resource://mapbox-sdk-docs - SDK and client library docs
- resource://mapbox-guides - Tutorials and how-tos
- resource://mapbox-examples - Code examples and playgrounds
- resource://mapbox-reference - Reference materials (tilesets, data products)

This allows AI assistants and clients to fetch only the documentation category they need, improving performance and reducing context window usage.

The original resource://mapbox-documentation is kept for backward compatibility with a deprecation notice.

Implementation details:
- Created shared docParser utility for parsing and categorizing sections
- Added comprehensive tests for parser and new resources
- All 553 tests passing

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@mattpodwysocki mattpodwysocki requested a review from a team as a code owner February 12, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split monolithic documentation resource into logical sections

1 participant