{
  "schemaVersion": "1.0.0",
  "id": "stylus",
  "name": "Stylus",
  "category": "Digital Canvas & PDF",
  "status": "operational",
  "description": "Pressure-sensitive digital whiteboard and split-screen PDF annotator. Sketch diagrams, derive math equations, and annotate lectures.",
  "runtime": "client-edge",
  "capabilities": [
    "Pre-baked architectural diagram templates (RAG AI pipeline, OAuth2 flow, agent MCP mesh, microservices, CI/CD)",
    "Vector stroke path bezier Catmull-Rom smoothing and Douglas-Peucker point decimation",
    "WCAG 2.1 AAA/AA accessible design tokens and 7-token dark/light theme palette generation",
    "KaTeX mathematical formula parsing and rendering",
    "Custom vector SVG diagram generation (flowcharts, sequence flows, boxes)"
  ],
  "endpoints": [
    {
      "method": "POST",
      "path": "/v1/diagram-template",
      "summary": "Generate pre-baked SVG diagrams and Mermaid syntax",
      "url": "https://api.xicae.dev/stylus/v1/diagram-template"
    },
    {
      "method": "POST",
      "path": "/v1/accessible-palette",
      "summary": "Generate WCAG AAA/AA 7-token design system",
      "url": "https://api.xicae.dev/stylus/v1/accessible-palette"
    },
    {
      "method": "POST",
      "path": "/v1/bezier-ink",
      "summary": "Catmull-Rom spline cubic bezier and point simplification",
      "url": "https://api.xicae.dev/stylus/v1/bezier-ink"
    },
    {
      "method": "POST",
      "path": "/v1/color-contrast",
      "summary": "Calculate WCAG contrast ratio and harmonic color palettes",
      "url": "https://api.xicae.dev/stylus/v1/color-contrast"
    },
    {
      "method": "POST",
      "path": "/v1/latex-parse",
      "summary": "Validate LaTeX math and convert to Unicode/MathML",
      "url": "https://api.xicae.dev/stylus/v1/latex-parse"
    }
  ],
  "mcp": {
    "url": "https://xicae.dev/stylus/mcp",
    "tools": [
      {
        "name": "stylus_render_mermaid_diagram",
        "description": "Render raw Mermaid flowchart/graph markdown syntax directly into clean, self-contained vector SVG markup with zero manual JSON schema effort.",
        "parameters": {
          "type": "object",
          "properties": {
            "mermaid_code": {
              "type": "string",
              "description": "Raw Mermaid markdown syntax (e.g. \"graph LR\\n A[User] --> B[API]\")"
            },
            "title": {
              "type": "string",
              "description": "Diagram title"
            },
            "theme": {
              "type": "string",
              "enum": [
                "dark",
                "light",
                "blueprint"
              ],
              "description": "Visual theme"
            }
          },
          "required": [
            "mermaid_code"
          ]
        }
      },
      {
        "name": "stylus_generate_diagram_template",
        "description": "Generate complete, beautifully rendered vector SVG diagrams and Mermaid syntax from pre-baked architecture templates (RAG AI pipeline, OAuth2 auth flow, agent MCP mesh, microservices, CI/CD pipeline).",
        "parameters": {
          "type": "object",
          "properties": {
            "template": {
              "type": "string",
              "enum": [
                "rag_ai_pipeline",
                "oauth2_login_flow",
                "agent_mcp_mesh",
                "microservices_architecture",
                "ci_cd_deployment_pipeline"
              ],
              "description": "Pre-baked architectural diagram template"
            },
            "direction": {
              "type": "string",
              "enum": [
                "TB",
                "LR"
              ],
              "description": "Layout direction"
            },
            "theme": {
              "type": "string",
              "enum": [
                "dark",
                "light",
                "blueprint"
              ],
              "description": "Visual theme"
            }
          },
          "required": [
            "template"
          ]
        }
      },
      {
        "name": "stylus_generate_accessible_palette",
        "description": "Generate a complete 7-token accessible design system (dark and light themes, background, card surface, borders, text, brand accent) with verified WCAG AAA/AA contrast ratings and ready-to-use CSS variables.",
        "parameters": {
          "type": "object",
          "properties": {
            "brand_color": {
              "type": "string",
              "description": "Primary brand hex color code (e.g. \"#8B5CF6\", \"#06B6D4\")"
            }
          },
          "required": [
            "brand_color"
          ]
        }
      },
      {
        "name": "stylus_bezier_stroke_math",
        "description": "Calculate smooth Catmull-Rom to cubic Bezier curve paths, apply Douglas-Peucker point decimation to reduce coordinate bloat by up to 80%, and produce clean SVG <path d=\"...\" /> markup.",
        "parameters": {
          "type": "object",
          "properties": {
            "points": {
              "type": "array",
              "description": "List of raw digitizer / mouse point samples with x and y coordinates"
            }
          },
          "required": [
            "points"
          ]
        }
      },
      {
        "name": "stylus_color_palette_and_contrast",
        "description": "Calculate WCAG 2.1 contrast ratios (AA/AAA pass/fail for normal and large text), color space conversions (HEX, RGB, HSL), and harmonic palettes (complementary, analogous, triadic, monochromatic).",
        "parameters": {
          "type": "object",
          "properties": {
            "color": {
              "type": "string",
              "description": "Foreground or primary color in Hex (#RRGGBB), rgb(), or hsl() format"
            },
            "background_color": {
              "type": "string",
              "description": "Background color to evaluate contrast ratio against"
            }
          },
          "required": [
            "color"
          ]
        }
      },
      {
        "name": "stylus_render_latex",
        "description": "Validate KaTeX / LaTeX mathematical formulas, detect syntax errors and unmatched braces, and convert to clean Unicode math notation or MathML for rendering.",
        "parameters": {
          "type": "object",
          "properties": {
            "latex": {
              "type": "string",
              "description": "Raw LaTeX formula string"
            },
            "format": {
              "type": "string",
              "enum": [
                "unicode",
                "mathml",
                "ascii"
              ],
              "description": "Output format"
            }
          },
          "required": [
            "latex"
          ]
        }
      },
      {
        "name": "stylus_generate_svg_diagram",
        "description": "Generate crisp, clean vector SVG diagrams (flowcharts, sequence flows, architectural boxes with connecting arrows) from structured node and edge definitions.",
        "parameters": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string",
              "description": "Diagram title"
            },
            "direction": {
              "type": "string",
              "enum": [
                "TB",
                "LR"
              ],
              "description": "Layout direction"
            },
            "theme": {
              "type": "string",
              "enum": [
                "dark",
                "light",
                "blueprint"
              ],
              "description": "Visual theme"
            },
            "nodes": {
              "type": "array",
              "description": "List of diagram nodes/boxes"
            },
            "edges": {
              "type": "array",
              "description": "List of connections between nodes"
            }
          },
          "required": [
            "nodes",
            "edges"
          ]
        }
      }
    ]
  },
  "rateLimit": {
    "requestsPerMinute": 60,
    "quotaReset": "sliding-window"
  },
  "documentation": "https://xicae.dev/llms.txt"
}