{
  "name": "terns-amazon-api-proxy",
  "version": "1.0.0",
  "description": "Authenticated proxy for the Amazon Selling Partner API and Amazon Advertising API. Amazon credentials are held by this Worker and never leave it.",
  "surfaces": {
    "POST /mcp": "Code Mode MCP. One `code` tool; discover endpoints with codemode.search / codemode.describe. Accepts either a static bearer token or an OAuth access token.",
    "ANY /api/{path}": "Raw passthrough. `/api/orders/v0/orders` hits SP-API; `/api/ads/v2/profiles` hits the Ads API. Bearer only.",
    "ANY /admin/credentials": "Staged credential rotation. Requires the separate admin bearer token.",
    "GET /health": "Liveness and configuration check."
  },
  "catalog": {
    "operations": 607,
    "spApi": 373,
    "ads": 234,
    "access": {
      "read": 309,
      "write": 260,
      "destructive": 38
    }
  },
  "policy": {
    "writesAllowed": true,
    "destructiveAllowed": true,
    "region": "na",
    "defaultMarketplaceIds": "ATVPDKIKX0DER,A2EUQ1WTGCTBG2,A1AM78C64UM0Y8,A2Q3Y263D00KWC"
  },
  "conventions": {
    "adsPrefix": "Ads paths are prefixed `/ads`; everything else is SP-API.",
    "credentials": "Never send an Amazon token. The proxy performs the LWA exchange.",
    "marketplaceIds": "Filled in from DEFAULT_MARKETPLACE_IDS when an SP-API operation declares the parameter and you omit it.",
    "adsProfile": "Pass `profileId` in the query; the proxy lifts it into Amazon-Advertising-API-Scope. List them with GET /api/ads/v2/profiles."
  }
}