{
  "schemaVersion": "1.0.0",
  "id": "gateway",
  "name": "Xicae API & MCP",
  "category": "API & Dev Tools",
  "status": "operational",
  "description": "Deterministic developer APIs and Model Context Protocol (MCP) server. Math evaluation, unit conversions, code formatting, table transforms, and ephemeris.",
  "runtime": "client-edge",
  "capabilities": [
    "Model Context Protocol (MCP) streamable JSON-RPC transport hosting 37 verified tools",
    "Namespaced domain sub-routers (/mcp/miqat, /mcp/compress, /mcp/webcode, /mcp/weboffice, /mcp/stylus, /mcp/utility)",
    "OpenAPI 3.1 specification for REST endpoints and Scalar interactive docs",
    "Multi-category unit conversions and deterministic mathematical evaluations",
    "5 free daily requests per IP with optional x402 micro-settlement on Base USDC"
  ],
  "endpoints": [
    {
      "method": "POST",
      "path": "/mcp",
      "summary": "Unified Streamable MCP Endpoint (37 Tools)",
      "url": "https://api.xicae.dev/gateway/mcp"
    },
    {
      "method": "POST",
      "path": "/mcp/miqat",
      "summary": "Scoped Celestial & Qibla MCP Tools (5 Tools)",
      "url": "https://api.xicae.dev/gateway/mcp/miqat"
    },
    {
      "method": "POST",
      "path": "/mcp/compress",
      "summary": "Scoped Media & PDF Optimization MCP Tools (7 Tools)",
      "url": "https://api.xicae.dev/gateway/mcp/compress"
    },
    {
      "method": "POST",
      "path": "/mcp/webcode",
      "summary": "Scoped Code Scaffolding & AST MCP Tools (6 Tools)",
      "url": "https://api.xicae.dev/gateway/mcp/webcode"
    },
    {
      "method": "POST",
      "path": "/mcp/weboffice",
      "summary": "Scoped Spreadsheet Matrix & Document MCP Tools (6 Tools)",
      "url": "https://api.xicae.dev/gateway/mcp/weboffice"
    },
    {
      "method": "POST",
      "path": "/mcp/stylus",
      "summary": "Scoped Vector Diagram & Design Token MCP Tools (7 Tools)",
      "url": "https://api.xicae.dev/gateway/mcp/stylus"
    },
    {
      "method": "POST",
      "path": "/mcp/utility",
      "summary": "Scoped Math, Regex, Unit Conversion & Hash MCP Tools (6 Tools)",
      "url": "https://api.xicae.dev/gateway/mcp/utility"
    },
    {
      "method": "GET",
      "path": "/openapi.json",
      "summary": "Self-hosted OpenAPI 3.1 specification",
      "url": "https://api.xicae.dev/gateway/openapi.json"
    },
    {
      "method": "GET",
      "path": "/docs",
      "summary": "Interactive Scalar API Documentation",
      "url": "https://api.xicae.dev/gateway/docs"
    }
  ],
  "mcp": {
    "url": "https://xicae.dev/gateway/mcp",
    "tools": [
      {
        "name": "utility_calculate_expression",
        "description": "Safely and deterministically evaluate arithmetic expressions, trigonometry (deg/rad), powers, logarithms, and statistical functions (mean, median, stddev, sum, min, max) on numeric arrays without rounding errors.",
        "parameters": {
          "type": "object",
          "properties": {
            "expression": {
              "type": "string",
              "description": "Mathematical expression (e.g. \"sin(45 deg) * 12 + sqrt(144)\", \"mean([15, 22, 38, 45, 90])\")"
            },
            "variables": {
              "type": "object",
              "description": "Optional dictionary of variable substitutions"
            },
            "precision": {
              "type": "number",
              "description": "Decimal precision for results (default: 6)"
            }
          },
          "required": [
            "expression"
          ]
        }
      },
      {
        "name": "utility_convert_units",
        "description": "Convert measurements with high precision across Digital Storage (B, KB, MB, GB, TB, KiB, MiB, GiB), Time (ms, sec, min, hr, day), Length (mm, cm, m, km, inch, ft, mile), Mass (g, kg, oz, lb), Temperature (C, F, K), and CSS units (px, rem, em, pt).",
        "parameters": {
          "type": "object",
          "properties": {
            "value": {
              "type": "number",
              "description": "Numeric value to convert"
            },
            "from_unit": {
              "type": "string",
              "description": "Source unit symbol (e.g. \"GiB\", \"px\", \"celsius\", \"kg\", \"mile\")"
            },
            "to_unit": {
              "type": "string",
              "description": "Target unit symbol (e.g. \"MB\", \"rem\", \"fahrenheit\", \"lb\", \"km\")"
            },
            "root_base_px": {
              "type": "number",
              "description": "Root base pixel font size for CSS rem/em conversions (default: 16)"
            }
          },
          "required": [
            "value",
            "from_unit",
            "to_unit"
          ]
        }
      },
      {
        "name": "utility_convert_table",
        "description": "Seamlessly transform tabular data between Markdown Table, JSON Array of Objects, CSV, TSV, and HTML table markup with automatic column alignment.",
        "parameters": {
          "type": "object",
          "properties": {
            "data": {
              "type": "string",
              "description": "Raw input data (Markdown table with | pipes, JSON array string, or CSV/TSV text)"
            },
            "source_format": {
              "type": "string",
              "enum": [
                "auto",
                "markdown",
                "json",
                "csv",
                "tsv"
              ],
              "description": "Source data format (default: auto)"
            },
            "target_format": {
              "type": "string",
              "enum": [
                "markdown",
                "json",
                "csv",
                "tsv",
                "html"
              ],
              "description": "Desired output table format"
            }
          },
          "required": [
            "data",
            "target_format"
          ]
        }
      },
      {
        "name": "utility_generate_diff",
        "description": "Compare two text strings or code snippets and produce a standard unified diff (diff -u) format with line markers, addition/deletion counts, and change summary.",
        "parameters": {
          "type": "object",
          "properties": {
            "original_text": {
              "type": "string",
              "description": "Original text or code string before edits"
            },
            "modified_text": {
              "type": "string",
              "description": "Updated text or code string after edits"
            },
            "file_name": {
              "type": "string",
              "description": "File name header for unified diff patch (default: \"file.txt\")"
            }
          },
          "required": [
            "original_text",
            "modified_text"
          ]
        }
      },
      {
        "name": "utility_regex_match",
        "description": "Test regular expressions against target text, extract matched substrings and capture groups, and check for regex syntax errors.",
        "parameters": {
          "type": "object",
          "properties": {
            "pattern": {
              "type": "string",
              "description": "Regular expression pattern string"
            },
            "flags": {
              "type": "string",
              "description": "Regex flags (e.g. \"g\", \"i\", \"m\", \"s\", default: \"g\")"
            },
            "text": {
              "type": "string",
              "description": "Target text to evaluate and extract matches from"
            }
          },
          "required": [
            "pattern",
            "text"
          ]
        }
      },
      {
        "name": "utility_crypto_hash",
        "description": "Generate cryptographic hashes (SHA-256, SHA-512, SHA-1), unique UUIDv4 tokens, Base64 encode/decode, and URL safe encoding.",
        "parameters": {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "enum": [
                "sha256",
                "sha512",
                "sha1",
                "uuid",
                "base64_encode",
                "base64_decode",
                "url_encode",
                "url_decode"
              ],
              "description": "Cryptographic or encoding operation"
            },
            "text": {
              "type": "string",
              "description": "Input string to hash or encode/decode"
            }
          },
          "required": [
            "action"
          ]
        }
      }
    ]
  },
  "rateLimit": {
    "requestsPerMinute": 60,
    "quotaReset": "sliding-window"
  },
  "documentation": "https://xicae.dev/llms.txt"
}