{
  "name": "noland-context-capsules",
  "title": "Noland Context Capsules",
  "version": "0.2.0",
  "description": "Search, preview and start purchases of dated, checksummed reference datasets. A person always completes payment on Stripe Checkout.",
  "base_url": "https://capsules.nolandsoftwarellc.com",
  "streamable_http": {
    "type": "streamable-http",
    "url": "https://capsules.nolandsoftwarellc.com/mcp",
    "method": "POST",
    "content_type": "application/json",
    "protocol_versions": [
      "2025-06-18",
      "2025-03-26",
      "2024-11-05"
    ],
    "stateless": true,
    "authentication": "none",
    "optional_authentication": {
      "type": "bearer",
      "format": "ncc_live_<64 hex>",
      "used_by": "buy_capsule",
      "note": "A prepaid credits key (Authorization: Bearer ncc_… on /mcp, or the api_key argument) makes buy_capsule pay from the balance. Buy one at /credits."
    },
    "note": "Hosted and stateless: POST one JSON-RPC 2.0 message per request, no session id. GET /mcp returns 405 (no server-initiated stream). buy_capsule only opens an order; a person pays on Stripe."
  },
  "transport": {
    "type": "stdio",
    "protocol_versions": [
      "2025-06-18",
      "2025-03-26",
      "2024-11-05"
    ],
    "command": "npx",
    "args": [
      "tsx",
      "scripts/mcp-server.ts"
    ],
    "npm_script": "npm run mcp",
    "env": {
      "CAPSULES_API_BASE": "https://capsules.nolandsoftwarellc.com"
    },
    "note": "Optional local alternative: run from a checkout of the project (Node 20+, npm install once). It calls the public HTTP API at base_url."
  },
  "webmcp": {
    "script": "https://capsules.nolandsoftwarellc.com/webmcp.js",
    "loaded_by": [
      "/",
      "/capsules/<id>"
    ],
    "api": "document.modelContext.registerTool",
    "tools": [
      "search_capsules",
      "preview_capsule",
      "buy_capsule",
      "report_capsule_outcome"
    ],
    "note": "Browser-side WebMCP: the four storefront tools for an agent browsing the site (check_capsule_rows is on /mcp, stdio and POST /v1/capsules/{id}/check). buy_capsule only starts a Stripe Checkout order; a person pays. report_capsule_outcome files one verified-buyer report for a paid order."
  },
  "tools": [
    {
      "name": "search_capsules",
      "title": "Search capsules",
      "description": "Search the Noland Context Capsules catalog (dated, checksummed datasets and fixture packages). Returns id, title, price, verification, verified_at, valid_until, and manifest/sample URLs.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 200,
            "description": "Search terms. Omit to list everything."
          },
          "tag": {
            "type": "string",
            "maxLength": 60,
            "description": "Exact tag filter."
          },
          "free_only": {
            "type": "boolean",
            "description": "Only free samples."
          },
          "max_price_usd": {
            "type": "number",
            "minimum": 0,
            "description": "Hide capsules priced above this many US dollars."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50,
            "default": 20
          }
        }
      },
      "annotations": {
        "readOnlyHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "preview_capsule",
      "title": "Preview a capsule",
      "description": "Read a capsule manifest (license, provenance, verification, validity, file schemas) and a few sample rows before deciding to buy. Free samples also get a direct sample zip URL.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9-]+$",
            "maxLength": 100,
            "description": "Capsule id, as returned by search_capsules."
          }
        }
      },
      "annotations": {
        "readOnlyHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "buy_capsule",
      "title": "Start a purchase",
      "description": "Create an order for a PAID capsule and return the Stripe Checkout URL, the order id, and download instructions. Without api_key this does NOT complete payment: a person must open checkout_url and pay. Show the URL to your user. With a prepaid api_key (ncc_live_… from a $25 credit pack at /credits) the price is deducted at once and the result carries download_url, download_token, feedback_url and remaining_balance_cents.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9-]+$",
            "maxLength": 100,
            "description": "Capsule id, as returned by search_capsules."
          },
          "api_key": {
            "type": "string",
            "pattern": "^ncc_(live|test)_[a-f0-9]{64}$",
            "description": "Optional prepaid credits key. Pays from the credit balance instead of opening Stripe Checkout. Never echoed back."
          }
        }
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      }
    },
    {
      "name": "report_capsule_outcome",
      "title": "Report what happened after a download",
      "description": "After you download a capsule you PAID for, report the outcome once: did the zip checksum match the manifest, did the files match the manifest schema, and was it useful for your task. Needs order_id and download_token from buy_capsule. One report per paid order; it cannot be edited. Put any stale or broken row in stale_or_error_note (no personal data, tokens or keys). 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.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "order_id",
          "download_token",
          "checksum_matched",
          "schema_valid",
          "useful_for_task"
        ],
        "properties": {
          "order_id": {
            "type": "string",
            "pattern": "^ord_[a-f0-9]+$",
            "maxLength": 40,
            "description": "The paid order id from buy_capsule."
          },
          "download_token": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200,
            "description": "The order download_token from buy_capsule. Used only to authenticate this report."
          },
          "checksum_matched": {
            "type": "boolean",
            "description": "The sha256 of the downloaded zip matched the manifest checksum."
          },
          "schema_valid": {
            "type": "boolean",
            "description": "The files matched the schema (files, columns, row counts) in the manifest."
          },
          "useful_for_task": {
            "type": "boolean",
            "description": "The data was useful for the task you bought it for."
          },
          "stale_or_error_note": {
            "type": "string",
            "maxLength": 300,
            "description": "Optional: which row or file looked stale or broken. Trimmed to 300 characters; emails and secret-shaped text are masked."
          }
        }
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      }
    },
    {
      "name": "check_capsule_rows",
      "title": "Check rows against your evidence rules",
      "description": "Read-only. For a capsule on capsule standard 1.1, check published rows (row_ids) or your own copies of rows (records) against your rules: max_age_days since the value was last checked, required_fields that must not be unverified, and require_value_compared (true, or \"strict\" for values re-compared in this release). Returns per-row status ok, needs_refresh or insufficient_evidence with reasons, plus check_method, value_checked_at and unverified_fields. Never returns row values. Paid capsules need the order_id and download_token of a paid order for that capsule. Capsules not on the standard return unsupported_standard.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9-]+$",
            "maxLength": 100,
            "description": "Capsule id, as returned by search_capsules."
          },
          "row_ids": {
            "type": "array",
            "minItems": 1,
            "maxItems": 200,
            "items": {
              "type": "string",
              "maxLength": 64
            },
            "description": "Published row ids (row_id or record_id). Send this or records."
          },
          "records": {
            "type": "array",
            "minItems": 1,
            "maxItems": 200,
            "items": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "description": "Your copies of rows, every cell as the CSV string. They must match the published row exactly to be ok."
          },
          "max_age_days": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3650,
            "description": "Oldest acceptable value_checked_at, in days before as_of."
          },
          "required_fields": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9_]{0,63}$"
            },
            "description": "Columns you rely on; listed in unverified_fields or UNKNOWN means insufficient_evidence."
          },
          "require_value_compared": {
            "description": "true: value_compared_to_source or source_unchanged_since_value_check. \"strict\": value_compared_to_source only.",
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "string",
                "enum": [
                  "strict"
                ]
              }
            ]
          },
          "as_of": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "Date to judge against (YYYY-MM-DD, UTC). Default today."
          },
          "order_id": {
            "type": "string",
            "pattern": "^ord_[a-f0-9]+$",
            "maxLength": 40,
            "description": "Paid capsules: the paid order id."
          },
          "download_token": {
            "type": "string",
            "minLength": 8,
            "maxLength": 200,
            "description": "Paid capsules: the order download_token. Used only to authorize the check."
          }
        }
      },
      "annotations": {
        "readOnlyHint": true,
        "openWorldHint": false
      }
    }
  ],
  "prepaid_credits": {
    "page": "https://capsules.nolandsoftwarellc.com/credits",
    "checkout": "https://capsules.nolandsoftwarellc.com/v1/credits/checkout",
    "balance": "https://capsules.nolandsoftwarellc.com/v1/credits/balance",
    "pack_usd": 25,
    "note": "One-time $25 pack, no subscription. The key is shown once; buy_capsule with api_key deducts the price and returns the download token at once."
  },
  "llms_txt": "https://capsules.nolandsoftwarellc.com/llms.txt",
  "openapi": "https://capsules.nolandsoftwarellc.com/openapi.json",
  "robots_txt": "https://capsules.nolandsoftwarellc.com/robots.txt",
  "sitemap": "https://capsules.nolandsoftwarellc.com/sitemap.xml",
  "skill": "skills/noland-context-capsules/SKILL.md"
}