{
  "name": "agentic-mermaid-hosted",
  "version": "0.1.1",
  "kind": "product",
  "displayName": "Agentic Mermaid MCP",
  "description": "Render, verify, describe, mutate, and build Mermaid diagrams through a stateless Streamable HTTP MCP server.",
  "icon": "https://agentic-mermaid.dev/favicon.svg",
  "url": "https://agentic-mermaid.dev/mcp",
  "serverUrl": "https://agentic-mermaid.dev/mcp",
  "wellKnownUrl": "https://agentic-mermaid.dev/.well-known/mcp",
  "transport": "streamable-http",
  "protocolVersions": [
    "2024-11-05",
    "2025-03-26",
    "2025-06-18"
  ],
  "instructions": "Use Agentic Mermaid for Mermaid diagram workflows. Prefer verify, describe, render_svg, render_ascii, render_png, mutate, and build for direct work; reserve execute for synchronous Code Mode logic that the declarative tools do not express.",
  "capabilities": {
    "tools": true,
    "resources": false
  },
  "tools": [
    {
      "name": "execute",
      "description": "Run synchronous JavaScript against the mermaid SDK in an isolated sandbox. Code runs as an expression or statement body — return the final value. Promise jobs, async/await, and dynamic import are not supported. Multi-step diagram edits should be one execute() call. The SDK declaration is TypeScript-shaped for guidance; the sandbox does not transpile type annotations. Hosted note: execute runs in an on-demand isolate and costs more than the direct render_svg/render_ascii/render_png/verify/describe tools — prefer those for plain render/verify calls. For straightforward structured edits, prefer the declarative mutate/build tools; reserve execute for logic the ops don't express.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "JavaScript to execute; mermaid.* SDK is global."
          },
          "timeoutMs": {
            "type": "number",
            "description": "Optional CPU-time budget (default 5000ms, max 30000ms)."
          }
        },
        "required": [
          "code"
        ]
      },
      "parameters": {
        "code": {
          "type": "string",
          "description": "JavaScript to execute; mermaid.* SDK is global.",
          "required": true
        },
        "timeoutMs": {
          "type": "number",
          "description": "Optional CPU-time budget (default 5000ms, max 30000ms).",
          "required": false
        }
      }
    },
    {
      "name": "render_svg",
      "description": "Render a Mermaid source string to themeable SVG. Returns { ok, svg }. Layout is deterministic: identical input produces identical geometry.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "Mermaid source."
          },
          "theme": {
            "type": "string",
            "description": "Named theme (one of: paper, dusk, zinc-light, zinc-dark, tokyo-night, tokyo-night-storm, tokyo-night-light, catppuccin-mocha, catppuccin-latte, nord, nord-light, dracula, github-light, github-dark, solarized-light, solarized-dark, one-dark, salmon, salmon-dark, tufte, tufte-dark)."
          },
          "bg": {
            "type": "string",
            "description": "Background CSS color (overrides theme)."
          },
          "fg": {
            "type": "string",
            "description": "Foreground CSS color (overrides theme)."
          },
          "style": {
            "description": "Style: a name (hand-drawn, excalidraw, pen-and-ink, freehand, watercolor, blueprint, tufte, accessible-high-contrast, patent-drawing, status-dashboard, ops-schematic, chalkboard, risograph, architectural-plan, publication-figure, or any theme name), an inline style record, or an array stack merged left → right. A colors-only style is a theme."
          },
          "seed": {
            "type": "number",
            "description": "Re-rolls ink wobble of styled looks; never moves layout."
          }
        },
        "required": [
          "source"
        ]
      },
      "parameters": {
        "source": {
          "type": "string",
          "description": "Mermaid source.",
          "required": true
        },
        "theme": {
          "type": "string",
          "description": "Named theme (one of: paper, dusk, zinc-light, zinc-dark, tokyo-night, tokyo-night-storm, tokyo-night-light, catppuccin-mocha, catppuccin-latte, nord, nord-light, dracula, github-light, github-dark, solarized-light, solarized-dark, one-dark, salmon, salmon-dark, tufte, tufte-dark).",
          "required": false
        },
        "bg": {
          "type": "string",
          "description": "Background CSS color (overrides theme).",
          "required": false
        },
        "fg": {
          "type": "string",
          "description": "Foreground CSS color (overrides theme).",
          "required": false
        },
        "style": {
          "description": "Style: a name (hand-drawn, excalidraw, pen-and-ink, freehand, watercolor, blueprint, tufte, accessible-high-contrast, patent-drawing, status-dashboard, ops-schematic, chalkboard, risograph, architectural-plan, publication-figure, or any theme name), an inline style record, or an array stack merged left → right. A colors-only style is a theme.",
          "required": false
        },
        "seed": {
          "type": "number",
          "description": "Re-rolls ink wobble of styled looks; never moves layout.",
          "required": false
        }
      }
    },
    {
      "name": "render_ascii",
      "description": "Render a Mermaid source string to text. Returns { ok, text }. useAscii true → plain ASCII (+,-,|); false/absent → Unicode box drawing (┌,─,│). targetWidth sets a hard terminal display-cell bound; impossible bounds return a typed error.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "Mermaid source."
          },
          "useAscii": {
            "type": "boolean",
            "description": "true = ASCII characters, false = Unicode (default)."
          },
          "targetWidth": {
            "type": "integer",
            "minimum": 1,
            "description": "Hard maximum line width in terminal display cells."
          }
        },
        "required": [
          "source"
        ]
      },
      "parameters": {
        "source": {
          "type": "string",
          "description": "Mermaid source.",
          "required": true
        },
        "useAscii": {
          "type": "boolean",
          "description": "true = ASCII characters, false = Unicode (default).",
          "required": false
        },
        "targetWidth": {
          "type": "integer",
          "minimum": 1,
          "description": "Hard maximum line width in terminal display cells.",
          "required": false
        }
      }
    },
    {
      "name": "render_png",
      "description": "Rasterize a Mermaid source string to PNG. Returns { ok, png_base64 }. Hosted rendering uses resvg-wasm with bundled fonts; bytes may differ from the local napi renderer, so hosted PNG is a convenience surface, not part of the byte-determinism contract. For file/URL artifacts use the local stdio server.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "Mermaid source."
          },
          "scale": {
            "type": "number",
            "description": "Output scale multiplier (default 2 — retina; clamped to 0.1–8)."
          },
          "background": {
            "type": "string",
            "description": "CSS color string (default 'white')."
          },
          "style": {
            "description": "Style name | record | stack (same as render_svg). Hosted rasterization bundles the built-in style faces; custom unbundled fonts use Inter with DejaVu per-glyph fallback."
          },
          "seed": {
            "type": "number",
            "description": "Ink seed for styled looks."
          }
        },
        "required": [
          "source"
        ]
      },
      "parameters": {
        "source": {
          "type": "string",
          "description": "Mermaid source.",
          "required": true
        },
        "scale": {
          "type": "number",
          "description": "Output scale multiplier (default 2 — retina; clamped to 0.1–8).",
          "required": false
        },
        "background": {
          "type": "string",
          "description": "CSS color string (default 'white').",
          "required": false
        },
        "style": {
          "description": "Style name | record | stack (same as render_svg). Hosted rasterization bundles the built-in style faces; custom unbundled fonts use Inter with DejaVu per-glyph fallback.",
          "required": false
        },
        "seed": {
          "type": "number",
          "description": "Ink seed for styled looks.",
          "required": false
        }
      }
    },
    {
      "name": "verify",
      "description": "Parse and verify a Mermaid diagram without rendering it. Returns { ok, family, summary, warnings, layout: { bounds, nodes, edges } } for valid diagrams and { ok: false, errors } for parse failures. `family` is the detected diagram family and `summary` a one-line description — check them: ok:true only means the diagram is structurally valid, not that it is the kind you intended. Warnings use the layout-rubric codes.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "Mermaid source."
          }
        },
        "required": [
          "source"
        ]
      },
      "parameters": {
        "source": {
          "type": "string",
          "description": "Mermaid source.",
          "required": true
        }
      }
    },
    {
      "name": "describe",
      "description": "Describe a Mermaid diagram. format=text returns { ok, text } with one or two summary sentences; format=json returns { ok, tree } with the AX tree; format=facts returns { ok, facts } with deterministic semantic fact lines for machine checking (for example edge A -> B : label, member Duck +quack()).",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "Mermaid source."
          },
          "format": {
            "type": "string",
            "enum": [
              "text",
              "json",
              "facts"
            ],
            "description": "text (default), json AX tree, or facts semantic read-back."
          }
        },
        "required": [
          "source"
        ]
      },
      "parameters": {
        "source": {
          "type": "string",
          "description": "Mermaid source.",
          "required": true
        },
        "format": {
          "type": "string",
          "enum": [
            "text",
            "json",
            "facts"
          ],
          "description": "text (default), json AX tree, or facts semantic read-back.",
          "required": false
        }
      }
    },
    {
      "name": "mutate",
      "description": "Apply a list of structured edit ops to an existing Mermaid `source` and return the edited diagram. This is the declarative counterpart to `execute`: plain JSON in, plain JSON out, no sandbox. Prefer it for straightforward edits; reserve `execute` for logic the ops don't express. Returns { ok, family, source, verify:{ ok, warnings } } on success, or { ok:false, family, opIndex, error } — where `error` names the offending field and lists the valid ones — when an op is malformed or cannot apply. Ops apply in order and are all-or-nothing: the first failing op stops the batch (its position is `opIndex`) and the input is left untouched. Each op is { \"kind\": <op>, …fields }. Op kinds by family: ...",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "Mermaid source to edit."
          },
          "ops": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Ordered list of edit ops; each is { kind, ...fields }."
          }
        },
        "required": [
          "source",
          "ops"
        ]
      },
      "parameters": {
        "source": {
          "type": "string",
          "description": "Mermaid source to edit.",
          "required": true
        },
        "ops": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "Ordered list of edit ops; each is { kind, ...fields }.",
          "required": true
        }
      }
    },
    {
      "name": "build",
      "description": "Author a new Mermaid diagram from blank by folding a list of structured ops over an empty diagram of `family`. The declarative counterpart to hand-writing source. Returns the same envelope as `mutate`: { ok, family, source, verify } or { ok:false, family, opIndex, error }. Op kinds by family: flowchart: add_node(id, label, shape?, parent?), remove_node(id), rename_node(from, to), set_label(target, label), add_edge(from, to, label?, style?), remove_edge(id), set_shape(id, shape), set_direction(direction, subgraph?), add_subgraph(id, label?, parent?, members?), remove_subgraph(id, removeMembers?), move_node(id, subgraph), define_class(name, style), set_node_class(id, className), set_node_st...",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "family": {
            "type": "string",
            "description": "Diagram family to author (one of: flowchart, state, sequence, timeline, class, er, journey, architecture, xychart, pie, quadrant, gantt, mindmap, gitgraph)."
          },
          "ops": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Ordered list of ops; each is { kind, ...fields }."
          }
        },
        "required": [
          "family",
          "ops"
        ]
      },
      "parameters": {
        "family": {
          "type": "string",
          "description": "Diagram family to author (one of: flowchart, state, sequence, timeline, class, er, journey, architecture, xychart, pie, quadrant, gantt, mindmap, gitgraph).",
          "required": true
        },
        "ops": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "Ordered list of ops; each is { kind, ...fields }.",
          "required": true
        }
      }
    }
  ],
  "links": {
    "homepage": "https://agentic-mermaid.dev/",
    "llms": "https://agentic-mermaid.dev/llms.txt",
    "documentation": "https://agentic-mermaid.dev/docs/mcp/",
    "capabilities": "https://agentic-mermaid.dev/capabilities.json",
    "examples": "https://agentic-mermaid.dev/examples/index.json",
    "repository": "https://github.com/adewale/agentic-mermaid"
  },
  "generatedFrom": {
    "packageVersion": "0.1.1",
    "gitSha": "18979d1fe30b3cbbb7ad4af55f35b37410723989",
    "buildTime": "development"
  }
}
