Render diagram
render_diagramRender Mermaid source with Line9's layout engine. Call this whenever you write or change Mermaid and the user should see the result. Flowcharts and sequence diagrams get Line9's layout; other Mermaid kinds are rendered with Mermaid's own layout and flagged as such. Returns a short verdict — kind, size, warnings, or a parse error with its line and column — plus an "Open in Line9" link. On a parse error, fix the named line and call again. Assistants that support MCP Apps show the diagram in a panel; there, do not paste the SVG or repeat the source in your reply. In an assistant with no panel (a terminal or editor), reply with the verdict line and the open_url link — that link is the only way the user sees the diagram. Write flowcharts as flowchart LR unless the user asks for top-to-bottom; chat panels are wide and short. No sign-in needed; renders carry a small Line9 mark unless the user is signed in to Line9 Pro. Set theme, orientation, spacing and legend in the source itself (line9: frontmatter; flowchart LR), never as arguments. This connector cannot publish or save. To publish, the user opens the diagram in Line9 (the open_url link) and publishes there — not with the Line9 CLI.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | No | Opaque plan from a previous result (widget use). A hint only: skips the solve when it still fits the source. | |
| source | Yes | Mermaid source. Optional YAML frontmatter is honoured — set it in the source, never as arguments: `title`, and a nested `line9:` block with `theme` (one of `boardroom`, `linen`, `blueprint`), `scale: { node, spacing }` and `flowchart: { legend: on | off }`. The flowchart direction directive is also honoured. Maximum 100000 characters. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg | No | ||
| path | No | ||
| plan | No | ||
| error | No | ||
| width | No | ||
| config | No | ||
| height | No | ||
| source | No | ||
| status | Yes | ||
| diagram | No | ||
| controls | No | ||
| diagrams | No | ||
| open_url | No | ||
| warnings | No | ||
| signed_in | No | ||
| truncated | No | ||
| watermark | No | ||
| edge_count | No | ||
| node_count | No | ||
| orientation | No | ||
| render_mode | No | ||
| stop_reason | No | ||
| diagram_type | No | ||
| engine_version | No | ||
| schema_version | Yes | ||
| fallback_reason | No | ||
| mermaid_version | No |