Skip to content

Conversation

@mattpodwysocki
Copy link
Contributor

Summary

Implements explore_mapbox_api_tool to provide structured, queryable information about Mapbox API endpoints, operations, parameters, and authentication requirements. Resolves #71.

Features

  • List all APIs: Shows 7 Mapbox APIs with descriptions and operation counts
  • View operations: Lists all operations for a specific API with HTTP methods and endpoints
  • Get endpoint details: Complete information including:
    • HTTP method and endpoint URL
    • Path, query, and body parameters with types and descriptions
    • Required token scopes
    • Rate limits
    • Example requests/responses (with details: true)

API Coverage

Documented 7 APIs with 24 total operations:

  • Geocoding (2 ops) - Forward/reverse geocoding
  • Styles (5 ops) - CRUD operations for map styles
  • Tokens (5 ops) - Token management
  • Static Images (2 ops) - Static map generation
  • Directions (1 op) - Route calculation
  • Tilequery (1 op) - Vector tile queries
  • Feedback (2 ops) - User feedback events

Implementation Details

  • Created /src/constants/mapboxApiEndpoints.ts with curated API definitions
  • Implemented tool extending BaseTool with proper input/output schemas
  • Returns both markdown content (human-readable) and structured content (machine-readable)
  • Proper MCP structured content support with separated text and data
  • No API access required - works with static curated data

Testing

  • ✅ 21 comprehensive test cases covering all functionality
  • ✅ All 574 project tests pass
  • ✅ Tool snapshot updated
  • ✅ Build successful
  • ✅ Tested in MCP Inspector - structured content validates correctly
  • ✅ Tested in Claude Desktop - natural language queries work perfectly

Documentation

  • Updated README.md with tool description and usage examples
  • Updated CHANGELOG.md with feature entry
  • Complements existing get_latest_mapbox_docs_tool by providing structured API reference data

Screenshots

Successfully tested in both MCP Inspector (structured content validation) and Claude Desktop (natural language queries).

🤖 Generated with Claude Code

Add explore_mapbox_api_tool to provide structured, queryable information
about Mapbox API endpoints, operations, parameters, and authentication.

Features:
- List all available Mapbox APIs (7 APIs with 24 operations total)
- View operations for specific APIs
- Get detailed endpoint information with parameters, scopes, rate limits
- Optional detailed mode includes example requests/responses
- Proper MCP structured content support with separate text and data

Coverage:
- Geocoding API (forward/reverse geocoding)
- Styles API (CRUD operations)
- Tokens API (token management)
- Static Images API (map image generation)
- Directions API (route calculation)
- Tilequery API (vector tile queries)
- Feedback API (user feedback events)

Implementation:
- Created mapboxApiEndpoints.ts with curated API definitions
- Implemented BaseTool with input/output schemas
- Returns both markdown content and structured data
- 21 comprehensive test cases, all passing
- Updated tool registry and documentation

Complements get_latest_mapbox_docs_tool by providing structured API
reference data instead of prose documentation.

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 06:25
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.

Add API Endpoint Explorer tool for structured API information

1 participant