{"uid":"cap_0XTMa33MaCZfxEqHJdFat","slug":"openapi-swagger-document-redactor-for-llm-context-84955a5d","name":"OpenAPI/Swagger Document Redactor for LLM Context","description":"Shrink an OpenAPI 3.x or Swagger 2.x document for LLM context by stripping verbose meta-fields (examples, descriptions, summaries, tags, externalDocs, deprecated). Categories are explicit; default is `[\"examples\", \"descriptions\"]`. User-defined property names under `properties: { ... }` are protected - only the meta-field `example` keyword inside a property schema is removed, not a user property literally named \"example\".","url":"https://agent402.tools/api/openapi-redact","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"spec":{"description":"OpenAPI/Swagger document (object or JSON string)"},"strip":{"description":"Categories to remove. Valid: examples, descriptions, summaries, tags, externalDocs, deprecated. Defaults to [\"examples\", \"descriptions\"]."}}},"responseSchema":{"type":"json","example":{"spec":{"info":{"title":"Demo","version":"1.0.0"},"paths":{"/users":{"get":{"summary":"List users","responses":{"200":{}},"parameters":[{"in":"query","name":"limit","schema":{"type":"integer"}}]}}},"openapi":"3.0.0"},"removed":{"examples":1,"descriptions":4},"sizeAfter":209,"sizeBefore":334}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Xp7_tH1JIQdO6XLwBU1F8","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Strips verbose meta-fields (examples, descriptions, summaries, tags, externalDocs, deprecated) from an OpenAPI 3.x or Swagger 2.x document to shrink it for LLM context windows","exampleAgentPrompt":"Strip the examples, descriptions, and deprecated fields from this OpenAPI spec so it fits in my LLM context — here's the full spec JSON: {...}.","exampleUseCases":null,"resultDescription":"A reduced OpenAPI or Swagger document object with the specified categories of verbose fields removed, ready to be passed directly into an LLM prompt with fewer tokens consumed.","failureModes":["Invalid or unparseable OpenAPI/Swagger document returns an error","Unrecognized strip category values may be ignored or return a validation error","Empty or null spec input returns a processing error","Non-JSON string input that cannot be parsed fails with a parse error"],"whenToPreferThis":"Use this endpoint when you need to pass an OpenAPI or Swagger specification into an LLM and the full document is too large for the context window. It is purpose-built for LLM token reduction on API specs, with fine-grained control over which meta-field categories to strip, unlike generic JSON minifiers or schema validators.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:58:44.706Z","isFirstParty":false}