{
  "$schema": "https://modelcontextprotocol.io/schemas/server-card/v1.json",
  "name": "metareva-mcp",
  "version": "1.1.0",
  "description": "Meta Reva ERP & WhatsApp B2B Model Context Protocol tool surface",
  "endpoint": "https://metareva.com/api/v1/mcp",
  "transport": {
    "type": "sse",
    "url": "https://metareva.com/api/v1/mcp/sse"
  },
  "tools": [
    {
      "name": "check_inventory",
      "description": "Query live ERP stock quantity, price, and warehouse allocations by SKU or product name.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "sku": { "type": "string", "description": "Stock keeping unit code or barcode" },
          "warehouse_id": { "type": "string", "description": "Optional warehouse filter" }
        },
        "required": ["sku"]
      }
    },
    {
      "name": "create_b2b_order",
      "description": "Submit confirmed purchase order into ERP (Logo, Mikro, Netsis) with credit line checks.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "customer_id": { "type": "string", "description": "Verified commercial customer tax ID or account code" },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sku": { "type": "string" },
                "quantity": { "type": "number" },
                "unit_price": { "type": "number" }
              },
              "required": ["sku", "quantity"]
            }
          }
        },
        "required": ["customer_id", "items"]
      }
    },
    {
      "name": "get_account_statement",
      "description": "Generate official balance PDF statement and delivery payload for verified commercial accounts.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "tax_number": { "type": "string", "description": "10 or 11 digit commercial tax number" }
        },
        "required": ["tax_number"]
      }
    }
  ]
}
