{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "schemaVersion": "1.0",
  "name": "Trace Diet — HAR & Log Context Distiller API",
  "humanReadableId": "apikeg/trace-diet",
  "agentVersion": "1.0.0",
  "description": "Shrink 5MB .har captures and 50,000-line crash logs by 95–99% while scrubbing live tokens before they hit your LLM context. Saves $0.25–$1.50 of wasted frontier-LLM input tokens per debugging turn, prevents live JWT/Cookie leakage into conversation history, folds multi-language stack traces accurately, and infers TypeScript API schemas in <40ms.",
  "provider": {
    "name": "API Keg",
    "url": "https://apikeg.com"
  },
  "capabilities": {
    "mcpVersion": "2025-06-18",
    "x402Version": 2,
    "streaming": false,
    "supportedMessageParts": [
      "json",
      "text"
    ]
  },
  "supportedInterfaces": [
    {
      "url": "https://trace-diet.apikeg.com/mcp",
      "protocolBinding": "MCP-STREAMABLE-HTTP",
      "protocolVersion": "2025-06-18"
    },
    {
      "url": "https://trace-diet.apikeg.com/openapi.json",
      "protocolBinding": "OPENAPI-REST",
      "protocolVersion": "3.1.0"
    },
    {
      "url": "https://trace-diet.apikeg.com/.well-known/api-catalog",
      "protocolBinding": "RFC9727-LINKSET",
      "protocolVersion": "1.0"
    }
  ],
  "defaultInputModes": [
    "application/json"
  ],
  "defaultOutputModes": [
    "application/json",
    "text/markdown",
    "text/html"
  ],
  "skills": [
    {
      "id": "distill_har_capture",
      "name": "Distill & Scrub HAR Network Capture",
      "description": "Parses Chrome DevTools / Playwright .har captures, strips static assets (.js/.css/fonts/images), analytics beacons, and OPTIONS preflights, scrubs credentials (Authorization, Cookie, Set-Cookie, X-Api-Key, token params, JWTs) into [REDACTED:<type>], groups dynamic :id/:uuid routes and polling loops, surfaces 4xx/5xx failures and slowestEndpoints, and infers compact TypeScript request/response schemas. Why call instead of DIY: Replaces ad-hoc jq/Python HAR scripts that miss base64 bodies, leak Bearer JWTs/cookies into LLM prompts, or fail to merge nullable JSON types across repeated API calls. Pricing: $0.002 base (up to $0.008 max ($0.002 base + $0.001 per 250KB of .har input, capped at $0.008), x402 variable settlement). Pass ?dry_run=true on REST to validate schema free.",
      "tags": [
        "developer-tools",
        "observability",
        "context-optimization",
        "security-hygiene"
      ],
      "pricing": {
        "scheme": "upto",
        "priceUsd": "0.002",
        "maxPriceUsd": "0.008",
        "unitDescription": "($0.002 base + $0.001 per 250KB of .har input, capped at $0.008)"
      },
      "documentationUrl": "https://trace-diet.apikeg.com/tools/distill-har-capture"
    },
    {
      "id": "cluster_logs",
      "name": "Cluster Noisy Logs via Drain Prefix-Tree",
      "description": "Folds multi-line stack traces (JS/Java 'at ...', Python Traceback, Go panics, Java 'Caused by:'), parses plain-text, Docker/Kubernetes CRI, and NDJSON logs, pre-masks <UUID>/<IP>/<HEX>/<ISO_TS>/<URL>/<NUM>, and runs a fixed-depth Drain prefix-tree clusterer to collapse 50,000+ log lines by 95–99% with errorClusters highlighted first. Why call instead of DIY: Avoids naive grep/head truncation that misses rare fatal stack traces buried at line 41,000, cutting 500k-token log dumps to ~2k tokens in <50ms. Pricing: $0.002 base (up to $0.008 max ($0.002 base + $0.001 per 2,000 log lines, capped at $0.008), x402 variable settlement). Pass ?dry_run=true on REST to validate schema free.",
      "tags": [
        "developer-tools",
        "observability",
        "context-optimization",
        "security-hygiene"
      ],
      "pricing": {
        "scheme": "upto",
        "priceUsd": "0.002",
        "maxPriceUsd": "0.008",
        "unitDescription": "($0.002 base + $0.001 per 2,000 log lines, capped at $0.008)"
      },
      "documentationUrl": "https://trace-diet.apikeg.com/tools/cluster-logs"
    }
  ]
}