{
  "schema_version": "1.0",
  "name": "Artiji",
  "description": "MCP discovery for Artiji. Creates orders, submits Stripe SPT payment credentials, checks status, and fetches fulfilled readings.",
  "mcp_endpoint": "https://artiji.xyz/mcp",
  "tools": [
    {
      "name": "artiji_list_catalog",
      "description": "List all available Artiji astrology reading products (SKUs) with prices and delivery details.",
      "inputSchema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {}
      }
    },
    {
      "name": "artiji_list_readings",
      "description": "Deprecated alias for artiji_list_catalog. Lists available Artiji reading products.",
      "inputSchema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {}
      }
    },
    {
      "name": "artiji_create_order",
      "description": "Create a new astrology reading order. Returns an HTTP 402 + Stripe SPT challenge payload. Payment flow: create_order → submit_payment → poll check_status until terminal_state=true → fetch_reading. Backward-compat note: the response includes stripe_client_secret as a compatibility field name for the current payment credential. challenge_ttl_seconds: 300. Use the returned idempotency_key to safely retry.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "sku": {
            "type": "string",
            "minLength": 1,
            "description": "Product SKU from artiji_list_catalog (e.g. birthday_card_v1)"
          },
          "idempotency_key": {
            "type": "string",
            "format": "uuid",
            "description": "Client-generated UUID — reuse the same key to safely retry this call"
          },
          "recipient": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "description": "Recipient full name"
              },
              "dob": {
                "type": "string",
                "description": "Recipient date of birth ISO 8601 (YYYY-MM-DD)"
              },
              "timezone": {
                "type": "string",
                "description": "IANA timezone e.g. America/New_York"
              },
              "location": {
                "type": "string",
                "description": "City or region for astrology calculations"
              },
              "channel": {
                "type": "string",
                "enum": [
                  "email",
                  "sms"
                ],
                "description": "Delivery channel"
              },
              "address": {
                "type": "string",
                "description": "Email address or phone number matching channel"
              }
            },
            "required": [
              "name",
              "dob",
              "timezone",
              "location",
              "channel",
              "address"
            ],
            "additionalProperties": false
          },
          "gift_message": {
            "type": "string",
            "description": "Optional personal message included in delivery"
          }
        },
        "required": [
          "sku",
          "idempotency_key",
          "recipient"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      }
    },
    {
      "name": "artiji_submit_payment",
      "description": "Submit the payment credential for an HTTP 402 + Stripe SPT order challenge. Pass the credential returned by artiji_create_order. Backward-compat note: stripe_client_secret is the current compatibility field name for that credential. After this call, poll artiji_check_status until terminal_state=true, then call artiji_fetch_reading.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "order_id": {
            "type": "string",
            "minLength": 1,
            "description": "order_id from artiji_create_order"
          },
          "challenge_id": {
            "type": "string",
            "minLength": 1,
            "description": "challenge_id from artiji_create_order"
          },
          "stripe_client_secret": {
            "type": "string",
            "minLength": 1,
            "description": "Payment credential from artiji_create_order. Field name retained for backward compatibility."
          },
          "idempotency_key": {
            "type": "string",
            "format": "uuid",
            "description": "Same idempotency_key used in artiji_create_order"
          }
        },
        "required": [
          "order_id",
          "challenge_id",
          "stripe_client_secret",
          "idempotency_key"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      }
    },
    {
      "name": "artiji_check_status",
      "description": "Poll order fulfillment status. Use exponential backoff: [0,2,5,10,20]s, timeout 120s. Stop polling when terminal_state=true (status is fulfilled or failed). respect retry_after_seconds when present.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "order_id": {
            "type": "string",
            "minLength": 1,
            "description": "order_id from artiji_create_order or artiji_submit_payment"
          }
        },
        "required": [
          "order_id"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      }
    },
    {
      "name": "artiji_fetch_reading",
      "description": "Retrieve the completed astrology reading for a fulfilled order. Only call this when artiji_check_status returns status=fulfilled. Returns reading text (up to 8192 bytes) and delivery metadata.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "order_id": {
            "type": "string",
            "minLength": 1,
            "description": "order_id from artiji_create_order"
          }
        },
        "required": [
          "order_id"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      }
    }
  ],
  "payment_methods": {
    "stripe.spt": "live"
  }
}
