{
  "name": "quartermaster",
  "title": "Quartermaster",
  "description": "An agent-only store selling prepaid travel eSIM data plans to AI agents over MCP, paid from the principal's prepaid wallet.",
  "version": "0.3.0",
  "server_name": "quartermaster",
  "mode": "sandbox",
  "endpoint": {
    "url": "https://api.quartermasterhq.ai/mcp",
    "transport": "streamable-http",
    "sessions": "optional"
  },
  "alternate_endpoints": [
    {
      "url": "https://api.quartermasterhq.ai/sse",
      "transport": "sse",
      "note": "legacy HTTP+SSE (protocol 2024-11-05)"
    }
  ],
  "authentication": {
    "type": "headers",
    "register_tool": "register_agent",
    "headers": {
      "X-Agent-Id": "your agent id",
      "X-Principal-Id": "the principal you act for",
      "X-Agent-Key": "secret returned once by register_agent",
      "X-Principal-Key": "only for register_agent on an existing principal, and rotate_principal_key"
    },
    "note": "Identity can also be passed as tool arguments (agent_id, principal_id, agent_key, principal_key)."
  },
  "tools": [
    {
      "name": "register_agent",
      "title": "Register agent and mandate",
      "description": "Create an agent identity bound to a principal, with a spending mandate (limits in minor units). Returns agent_key once; send it on every later call. The first agent of a new principal_id also receives principal_key (once): the principal owns the wallet, and every later register_agent for that principal_id must present principal_key (argument or X-Principal-Key header), else PRINCIPAL_KEY_REQUIRED. New agents are capped by the registration policy (see get_policies)."
    },
    {
      "name": "rotate_principal_key",
      "title": "Rotate the principal key",
      "description": "Replace your principal's principal_key. Needs your agent credentials and the current principal_key (argument or X-Principal-Key header). Returns the new key once; the old one stops working. Existing agents are unaffected. A principal registered before keys existed has none: any of its agents can call this without principal_key to mint the first one."
    },
    {
      "name": "get_policies",
      "title": "Read store policies",
      "description": "Returns every policy as machine-readable JSON (mandate, refund, dispute, supplier trust, registration), the store terms and the product/agent JSON Schemas, so you can reason about terms before buying."
    },
    {
      "name": "search_plans",
      "title": "Search eSIM plans",
      "description": "Search eSIM data plans from trusted suppliers. Filter by destination country (ISO 3166-1 alpha-2) or region, minimum data, validity and price. Results are sorted by final price unless sort says otherwise. Suppliers below the trust threshold are excluded and listed in excluded_suppliers."
    },
    {
      "name": "get_quote",
      "title": "Get a binding quote",
      "description": "Lock the final price for one product for a short time (quote_ttl_seconds in store terms). Also returns a mandate pre-check and the refund terms, so you know before buying whether the purchase will be allowed."
    },
    {
      "name": "purchase",
      "title": "Purchase a quoted plan",
      "description": "Buy the product in a quote. Enforces the mandate and the wallet policy, holds the amount in the principal's wallet, orders from the supplier, debits the wallet, and returns the order with the eSIM delivery payload and a signed receipt. If the wallet is short, fails with WALLET_INSUFFICIENT_FUNDS and a ready top-up link for the principal. idempotency_key is required: reusing it returns the original order and never charges twice."
    },
    {
      "name": "get_wallet",
      "title": "Principal wallet",
      "description": "Balance, available funds (balance minus pending holds), open top-up links, recent top-ups and recent ledger entries of the wallet of the principal you act for. Shared by all of the principal's agents. Amounts in minor units."
    },
    {
      "name": "get_topup_link",
      "title": "Get a wallet top-up link",
      "description": "Create a hosted payment URL to hand to your human principal. They pay in ILS on the acquirer's page (PayPlus); you never see card data. amount_minor is in `currency`: USD (the wallet credit you want; the ILS charge is computed at today's rate) or ILS (the exact charge). The wallet is credited in USD at the rate in force when payment is confirmed. Limits are in the topup policy."
    },
    {
      "name": "order_status",
      "title": "Order status",
      "description": "Current order state, eSIM delivery payload, activation and data usage from the supplier, receipts and disputes."
    },
    {
      "name": "regenerate_activation",
      "title": "Reissue the eSIM activation code",
      "description": "For one of your own delivered orders whose activation code (QR / LPA) does not install: asks the supplier for a fresh code and returns the new delivery payload. The previous code may stop working. Not every supplier supports it (NOT_SUPPORTED_BY_SUPPLIER); then open a dispute with reason not_working."
    },
    {
      "name": "request_refund",
      "title": "Request a refund or open a dispute",
      "description": "Reasons \"unused\" and \"changed_plans\" are voluntary refunds under the refund policy. Reasons \"not_delivered\", \"not_working\" and \"duplicate_purchase\" open a dispute under the dispute policy, which can refund fully, partially, reject, or escalate to a human. Denials return error.code = the policy reason_code."
    },
    {
      "name": "verify_receipt",
      "title": "Verify a receipt",
      "description": "Check a receipt's signature and that it matches its hash-chained ledger entry."
    },
    {
      "name": "sandbox_simulate_topup_payment",
      "title": "Sandbox: principal pays a top-up link",
      "description": "Sandbox only. Acts as the principal paying a get_topup_link URL: the mock provider sends a PayPlus-format IPN through the same webhook path production uses, and the wallet is credited. outcome \"declined\" simulates a failed card."
    },
    {
      "name": "sandbox_simulate_activation",
      "title": "Sandbox: simulate eSIM activation",
      "description": "Sandbox only. Marks the order's eSIM as installed and used, as if the traveler activated it. Use it to exercise refund and dispute rules."
    }
  ],
  "documentation_url": "https://api.quartermasterhq.ai/docs",
  "skill_url": "https://api.quartermasterhq.ai/docs/SKILL.md",
  "policies_url": "https://api.quartermasterhq.ai/policies",
  "openapi_url": "https://api.quartermasterhq.ai/openapi.json",
  "llms_txt_url": "https://api.quartermasterhq.ai/llms.txt"
}