{"openapi":"3.0.3","info":{"title":"Noland Context Capsules","version":"0.4.0","termsOfService":"/terms","contact":{"name":"Noland Software LLC","email":"brendancribbs@nolandsoftwarellc.com"},"x-legal":{"terms":"/terms","privacy":"/privacy","refunds":"/refunds","disclaimer":"Not legal, tax, or compliance advice. Capsules are dated reference data compiled from public sources. Some rows are marked PARTIAL or UNVERIFIED, and rules change after the snapshot date. Do not rely on a capsule to file taxes, clear customs, contact consumers, or make compliance decisions without checking the current official source or a qualified professional."},"description":"Dated, checksummed reference datasets and test fixtures for developers and AI agents. Not legal, tax, or compliance advice. Capsules are dated reference data compiled from public sources. Some rows are marked PARTIAL or UNVERIFIED, and rules change after the snapshot date. Do not rely on a capsule to file taxes, clear customs, contact consumers, or make compliance decisions without checking the current official source or a qualified professional. listing=product means the owner approved the capsule for sale at the listed USD price; verification and provenance fields still state what was and was not checked, and valid_until is the sale cutoff. verification=unverified-demo means a memory seed, not a factual review. verification=source-checked means rows were compared with cited sources on the snapshot date; PARTIAL and UNVERIFIED rows remain. verification=tested means fixture tests ran in the stated scope. GET /v1/capsules/{id}/sample downloads a source-checked sample with no order and no download token. GET /llms.txt lists the whole catalog for agents. A PaymentIntent does not let an agent pay. A payer must be provisioned in Stripe, and the bank may require authentication. This service does not pay autonomously. mock-pay exists only for localhost development and is forced off in production. Purchases are subject to /terms, /privacy, and /refunds."},"paths":{"/health":{"get":{"operationId":"health","responses":{"200":{"description":"Process is up. capsules is a count, not a quality claim."}}}},"/openapi.json":{"get":{"operationId":"openapi","responses":{"200":{"description":"This document."}}}},"/llms.txt":{"get":{"operationId":"llmsTxt","description":"Plain-text map of the store for coding agents, generated from the live catalog: endpoints, free sample URLs, and every capsule with price, verified_at, schema summary, manifest and sample URLs.","responses":{"200":{"description":"text/plain; charset=utf-8"}}}},"/robots.txt":{"get":{"operationId":"robotsTxt","description":"Crawler rules: all crawlers, including AI crawlers, may read the catalog; /orders/, /buy/ and /v1/orders/ are private. Links to /llms.txt and /openapi.json.","responses":{"200":{"description":"text/plain; charset=utf-8"}}}},"/.well-known/mcp.json":{"get":{"operationId":"mcpDiscovery","description":"Discovery document for the Noland Context Capsules MCP server: name, version, base URL, the four tools (search_capsules, preview_capsule, buy_capsule, report_capsule_outcome), the hosted Streamable HTTP endpoint (POST /mcp), the optional local stdio invocation, and links to /llms.txt, /openapi.json and /sitemap.xml.","responses":{"200":{"description":"application/json"}}}},"/sitemap.xml":{"get":{"operationId":"sitemap","description":"XML sitemap generated from the live catalog: the home page, legal pages and every capsule detail page, with lastmod from each capsule verified_at.","responses":{"200":{"description":"application/xml; charset=utf-8"}}}},"/webmcp.js":{"get":{"operationId":"webmcpScript","description":"Same-origin browser script (loaded by / and /capsules/{id}) that registers the WebMCP tools search_capsules, preview_capsule, buy_capsule and report_capsule_outcome with document.modelContext.registerTool(). They call this API; buy_capsule only starts a Stripe Checkout order and never pays. The home page search form also carries the declarative WebMCP attributes toolname, tooldescription, toolparamdescription and toolautosubmit.","responses":{"200":{"description":"application/javascript; charset=utf-8, cacheable, with an ETag."}}}},"/.well-known/mcp-registry-auth":{"get":{"operationId":"mcpRegistryAuth","description":"MCP Registry HTTP-auth proof: text/plain `v=MCPv1; k=ed25519; p=<base64 public key>` (public key only), no redirects.","responses":{"200":{"description":"text/plain; charset=utf-8, at most 4096 bytes."}}}},"/mcp":{"post":{"operationId":"mcpStreamableHttp","description":"Hosted MCP server (Streamable HTTP, stateless, no auth). Send one JSON-RPC 2.0 message per request: initialize, ping, tools/list, tools/call for search_capsules, preview_capsule, buy_capsule and report_capsule_outcome (one verified-buyer report per paid order), or a notification. buy_capsule only opens a Stripe Checkout order (same rate limit and checkout path as POST /v1/orders); a person pays. No session id.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"method":{"type":"string"},"params":{"type":"object"}}}}}},"responses":{"200":{"description":"JSON-RPC 2.0 response (application/json)."},"202":{"description":"Notification or client response accepted; no body."},"400":{"description":"Invalid JSON (-32700) or unsupported MCP-Protocol-Version."},"403":{"description":"Cross-origin browser request refused."},"429":{"description":"Rate limit exceeded; see Retry-After."}}},"get":{"operationId":"mcpGetNotSupported","description":"Always 405 with Allow: POST. The server opens no SSE stream.","responses":{"405":{"description":"Method not allowed; JSON note explains the stateless POST endpoint."}}}},"/{indexNowKey}.txt":{"get":{"operationId":"indexNowKey","description":"IndexNow ownership file: returns the public key as text/plain. Only the configured key file exists; any other .txt path is 404.","parameters":[{"name":"indexNowKey","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9-]{8,128}$"}}],"responses":{"200":{"description":"text/plain; charset=utf-8, the key."},"404":{"description":"Not the configured key."}}}},"/yandex_{id}.html":{"get":{"operationId":"yandexVerification","description":"Yandex Webmaster ownership file (text/html; charset=UTF-8). Only the configured token exists; other /yandex_*.html paths are 404.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Verification page."},"404":{"description":"Not the configured token."}}}},"/terms":{"get":{"operationId":"termsOfSale","responses":{"200":{"description":"Terms of Sale (HTML)."}}}},"/privacy":{"get":{"operationId":"privacyPolicy","responses":{"200":{"description":"Privacy Policy (HTML)."}}}},"/refunds":{"get":{"operationId":"refundPolicy","responses":{"200":{"description":"Refund Policy (HTML)."}}}},"/v1/search":{"get":{"operationId":"search","parameters":[{"name":"q","in":"query","schema":{"type":"string","maxLength":200}},{"name":"tag","in":"query","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"Summaries with price_cents, listing, verification, for_sale, commercial_ready, valid_until, expired."}}}},"/v1/capsules/{id}":{"get":{"operationId":"getCapsule","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Summary plus manifest (license, provenance, preview), disclaimer, and legal links. No zip path."},"404":{"description":"Unknown id."}}}},"/v1/capsules/{id}/sample":{"get":{"operationId":"downloadFreeSample","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Zip bytes for a source-checked sample. Header X-Capsule-Sha256. No bearer token."},"403":{"description":"Demo, product, or anything that is for sale."},"409":{"description":"On-disk bytes do not match the catalog checksum."}}}},"/v1/orders":{"post":{"operationId":"createOrder","description":"Body {\"capsule_id\": \"...\", \"payment_method\": \"checkout\" | \"payment_intent\"}. Default is checkout when the server has a PUBLIC_BASE_URL. checkout returns a Stripe-hosted checkout_url for a human or browser; payment_intent returns client_secret for Stripe.js or a provisioned payer. A PaymentIntent does not let an agent pay. A payer must be provisioned in Stripe, and the bank may require authentication. This service does not pay autonomously.","responses":{"201":{"description":"Order, one-time download_token (body only, never a URL), checkout_url or client_secret, terms_url."},"403":{"description":"Free pilot: paid orders off."},"409":{"description":"Demo, sample, or expired capsule is not for sale."}}}},"/v1/orders/{id}":{"get":{"operationId":"getOrder","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Order status; poll until paid=true. Includes feedback_url, the report endpoint for this order."}}}},"/v1/orders/{id}/download":{"get":{"operationId":"downloadPaid","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"description":"Authorization: Bearer download_token. Query tokens are not used by the client. The response carries X-Capsule-Sha256 and X-Capsule-Feedback-Url (the report endpoint for this order).","responses":{"200":{"description":"Paid zip. Headers X-Capsule-Sha256, X-Capsule-Feedback-Url."},"402":{"description":"Unpaid."},"403":{"description":"Bad token."}}}},"/v1/orders/{id}/feedback":{"post":{"operationId":"reportCapsuleOutcome","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"description":"Verified-buyer outcome report for a PAID order, authenticated like the download (Authorization: Bearer download_token, X-Download-Token, or the order cookie; never a query token). Exactly one report per paid order; it cannot be edited or replaced. Refunded, disputed, failed and pending orders are refused. Body JSON: checksum_matched, schema_valid, useful_for_task (all required booleans) and optional stale_or_error_note (text, trimmed to 300 characters; emails and secret-shaped strings are masked). A verified buyer whose report flags a stale or broken row, once we confirm it, qualifies for a free replacement on the next refresh of that capsule. The same action is the report_capsule_outcome tool over MCP and WebMCP. Per-capsule aggregates appear as verified_buyer_feedback on GET /v1/capsules/{id} (rates are fractions 0 to 1 over reports from still-paid orders) only when at least one report exists.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["checksum_matched","schema_valid","useful_for_task"],"properties":{"checksum_matched":{"type":"boolean"},"schema_valid":{"type":"boolean"},"useful_for_task":{"type":"boolean"},"stale_or_error_note":{"type":"string","maxLength":300}}}}}},"responses":{"201":{"description":"Report recorded: order_id, capsule_id, the stored report, replacement_policy."},"400":{"description":"A flag is missing or not a boolean, or the note is not text."},"403":{"description":"Missing or wrong download token."},"404":{"description":"No such order."},"409":{"description":"Order is not paid (code order_not_paid), or already reported (code already_reported)."},"429":{"description":"Rate limit exceeded."},"503":{"description":"Feedback storage is not enabled on this server."}}}},"/v1/webhooks/stripe":{"post":{"operationId":"stripeWebhook","description":"Signed Stripe events: payment_intent.succeeded, checkout.session.completed, checkout.session.async_payment_succeeded. livemode must match the server mode.","responses":{"200":{"description":"Received."}}}}}}