Skip to content

Commit eacd6af

Browse files
feat: add API endpoint explorer tool (#71)
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>
1 parent 0646781 commit eacd6af

9 files changed

Lines changed: 2009 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
## Unreleased
22

3+
### Features Added
4+
5+
- **API Endpoint Explorer Tool**: New `explore_mapbox_api_tool` provides structured, queryable information about Mapbox APIs (#71)
6+
- List all available Mapbox APIs with descriptions and operation counts
7+
- View detailed operations for specific APIs (geocoding, styles, tokens, static-images, directions, tilequery, feedback)
8+
- Get complete endpoint details including HTTP methods, parameters, required scopes, and rate limits
9+
- Optional detailed mode includes example requests and responses
10+
- Complements `get_latest_mapbox_docs_tool` by providing structured API reference data
11+
- No API access required - works with curated endpoint definitions
12+
313
### Documentation
414

515
- **PR Guidelines**: Added CHANGELOG requirement to CLAUDE.md (#67)

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,23 @@ The `MAPBOX_ACCESS_TOKEN` environment variable is required. **Each tool requires
131131

132132
📖 **[See more examples and interactive demo →](./docs/mapbox-docs-tool-demo.md)**
133133

134+
**explore_mapbox_api_tool** - Explore Mapbox API endpoints with structured, queryable information. Get details about available APIs, their operations, required parameters, authentication scopes, and rate limits. This tool provides structured API reference data complementing the prose documentation from `get_latest_mapbox_docs_tool`.
135+
136+
**Features:**
137+
138+
- List all available Mapbox APIs (geocoding, styles, tokens, static-images, directions, tilequery, feedback)
139+
- View operations for a specific API
140+
- Get detailed endpoint information including HTTP methods, parameters, and examples
141+
- See required token scopes and rate limits for each operation
142+
143+
**Example prompts:**
144+
145+
- "What Mapbox APIs are available?"
146+
- "Show me the geocoding API operations"
147+
- "What parameters does the forward geocoding endpoint accept?"
148+
- "What scopes do I need for the Styles API?"
149+
- "How do I use the directions API? Show me examples"
150+
134151
### Reference Tools
135152

136153
**get_reference_tool** - Access static Mapbox reference documentation and schemas. This tool provides essential reference information that helps AI assistants understand Mapbox concepts and build correct styles and tokens.

0 commit comments

Comments
 (0)