Skip to content

Add API Endpoint Explorer tool for structured API information #71

@mattpodwysocki

Description

@mattpodwysocki

Context

Create a tool that provides structured, queryable information about Mapbox APIs - similar to an interactive API reference that AI assistants can easily consume.

Motivation

Following Google's Developer Knowledge API approach, providing structured API information helps AI assistants:

  • Understand API capabilities without parsing prose
  • Generate correct API calls with proper parameters
  • Discover available endpoints and operations
  • Provide accurate rate limits and authentication requirements

Proposed Implementation

Create a new tool: explore_mapbox_api_tool

Input Schema:

  • api (string, required) - API name: "geocoding", "directions", "static", "styles", "tilequery", etc.
  • operation (string, optional) - Specific operation: "forward", "reverse", "retrieve", etc.
  • details (boolean, optional) - Include full parameter details and examples

Output:

  • API endpoint structure
  • HTTP methods
  • Path parameters
  • Query parameters with types and descriptions
  • Request/response examples
  • Rate limits
  • Required scopes
  • Related endpoints

Implementation approach:

  1. Create structured API definitions (JSON schema or similar)
  2. Parse from existing docs or create manually for major APIs
  3. Provide queryable interface
  4. Include working examples

Example usage:

{
  "api": "geocoding",
  "operation": "forward"
}

Returns:

{
  "endpoint": "https://api.mapbox.com/geocoding/v5/mapbox.places/{query}.json",
  "method": "GET",
  "parameters": {
    "query": {"type": "string", "required": true, "description": "..."},
    "access_token": {"type": "string", "required": true, ...},
    ...
  },
  "rateLimits": "600 requests per minute",
  "requiredScopes": ["styles:read"],
  "example": "..."
}

Acceptance Criteria

  • explore_mapbox_api_tool implemented
  • Structured API definitions for major Mapbox APIs
  • Queryable by API and operation
  • Includes parameters, examples, rate limits
  • Tests (unit and integration)
  • Updates CHANGELOG.md
  • Documentation in README.md

APIs to Cover (Priority Order)

  1. Geocoding (forward/reverse)
  2. Styles (CRUD operations)
  3. Tokens (CRUD operations)
  4. Static Images
  5. Directions
  6. Tilequery
  7. Feedback

Related

Part of enhanced documentation discovery initiative

Depends on: None (can be done in parallel)

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