Line9
Render Mermaid with Line9 layout in your assistant.
Sollte ich dies verwenden
Qualität und Sicherheit
Basierend auf einer automatisierten Analyse der Tool-Definitionen und der Einhaltung des Protokolls.
Kontextkosten
Dies ist die ungefähre Anzahl der Tokens, die jedes Mal verbraucht werden, wenn die Tools des Servers in den Kontext eines Modells geladen werden. Höhere Werte verringern die Aufmerksamkeit, die für andere Aufgaben verfügbar ist.
Installieren
Installation mit einem Klick
Fügen Sie dies Ihrer Datei `claude_desktop_config.json` hinzu:
{
"mcpServers": {
"diagrams": {
"url": "https://mcp.line9.ai/mcp"
}
}
}Remote-Endpunkte
https://mcp.line9.ai/mcpstreamable-httpWas es kann
Tool-Inventar
Tools (3)
🟢render_diagram(source, plan)
Render 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.
Eingabe-Schema
{
"type": "object",
"properties": {
"source": {
"type": "string",
"minLength": 1,
"description": "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."
},
"plan": {
"description": "Opaque plan from a previous result (widget use). A hint only: skips the solve when it still fits the source.",
"type": "string"
}
},
"required": [
"source"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": {}
}Ausgabe-Schema
{
"type": "object",
"properties": {
"schema_version": {
"type": "number"
},
"status": {
"type": "string",
"enum": [
"ok",
"diagram_error",
"ambiguous",
"not_found",
"auth_required",
"forbidden",
"not_entitled",
"rate_limited",
"upstream",
"invalid_input",
"internal"
]
},
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"next": {
"type": "string"
},
"stage": {
"type": "string"
},
"line": {
"type": "number"
},
"column": {
"type": "number"
},
"current_version": {
"type": "number"
},
"candidates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"slug": {
"type": "string"
}
},
"additionalProperties": {}
}
}
},
"required": [
"code"
],
"additionalProperties": {}
},
"path": {
"type": "string",
"enum": [
"solve",
"plan"
]
},
"render_mode": {
"type": "string",
"enum": [
"line9",
"mermaid_fallback"
]
},
"diagram_type": {
"type": [
"string",
"null"
]
},
"source": {
"type": "string"
},
"config": {
"type": "object",
"properties": {
"theme": {
"type": "string"
},
"scale": {
"type": "object",
"properties": {
"node": {
"type": "number"
},
"spacing": {
"type": "number"
}
},
"additionalProperties": {}
},
"flowchart": {
"type": "object",
"properties": {
"direction": {
"type": "string"
},
"legend": {
"type": "string",
"enum": [
"on",
"off"
]
}
},
"additionalProperties": {}
}
},
"additionalProperties": {}
},
"orientation": {
"type": "string",
"enum": [
"TB",
"BT",
"LR",
"RL"
]
},
"controls": {
"type": "object",
"properties": {
"orientation": {
"type": "boolean"
},
"legend": {
"type": "boolean"
}
},
"additionalProperties": {}
},
"node_count": {
"type": "number"
},
"edge_count": {
"type": "number"
},
"stop_reason": {
"type": "string"
},
"fallback_reason": {
"type": "string",
"enum": [
"unsupported_diagram_kind",
"node_cap_exceeded"
]
},
"watermark": {
"type": "boolean"
},
"signed_in": {
"type": "boolean"
},
"engine_version": {
"type": "string"
},
"mermaid_version": {
"type": "string"
},
"open_url": {
"type": "string"
},
"svg": {
"type": "string"
},
"width": {
"type": "number"
},
"height": {
"type": "number"
},
"plan": {
"type": "string"
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"diagram": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string"
},
"visibility": {
"type": "string"
},
"version": {
"type": "number"
},
"url": {
"type": "string"
},
"workspace_id": {
"type": "string"
}
},
"additionalProperties": {}
},
"diagrams": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string"
},
"visibility": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"url": {
"type": "string"
},
"version": {
"type": "number"
},
"workspace": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"additionalProperties": {}
}
},
"additionalProperties": {}
}
},
"truncated": {
"type": "boolean"
}
},
"required": [
"schema_version",
"status"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": {}
}🟢list_diagrams(query, limit)
List the diagrams published in the user's Line9 workspace(s): name, visibility, version, last update and permalink. Use it to find a diagram before `get_diagram`. Requires Line9 sign-in.
Eingabe-Schema
{
"type": "object",
"properties": {
"query": {
"description": "Case-insensitive substring of the diagram name.",
"type": "string"
},
"limit": {
"description": "Maximum rows to return (1–100; default 50).",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": {}
}Ausgabe-Schema
{
"type": "object",
"properties": {
"schema_version": {
"type": "number"
},
"status": {
"type": "string",
"enum": [
"ok",
"diagram_error",
"ambiguous",
"not_found",
"auth_required",
"forbidden",
"not_entitled",
"rate_limited",
"upstream",
"invalid_input",
"internal"
]
},
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"next": {
"type": "string"
},
"stage": {
"type": "string"
},
"line": {
"type": "number"
},
"column": {
"type": "number"
},
"current_version": {
"type": "number"
},
"candidates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"slug": {
"type": "string"
}
},
"additionalProperties": {}
}
}
},
"required": [
"code"
],
"additionalProperties": {}
},
"path": {
"type": "string",
"enum": [
"solve",
"plan"
]
},
"render_mode": {
"type": "string",
"enum": [
"line9",
"mermaid_fallback"
]
},
"diagram_type": {
"type": [
"string",
"null"
]
},
"source": {
"type": "string"
},
"config": {
"type": "object",
"properties": {
"theme": {
"type": "string"
},
"scale": {
"type": "object",
"properties": {
"node": {
"type": "number"
},
"spacing": {
"type": "number"
}
},
"additionalProperties": {}
},
"flowchart": {
"type": "object",
"properties": {
"direction": {
"type": "string"
},
"legend": {
"type": "string",
"enum": [
"on",
"off"
]
}
},
"additionalProperties": {}
}
},
"additionalProperties": {}
},
"orientation": {
"type": "string",
"enum": [
"TB",
"BT",
"LR",
"RL"
]
},
"controls": {
"type": "object",
"properties": {
"orientation": {
"type": "boolean"
},
"legend": {
"type": "boolean"
}
},
"additionalProperties": {}
},
"node_count": {
"type": "number"
},
"edge_count": {
"type": "number"
},
"stop_reason": {
"type": "string"
},
"fallback_reason": {
"type": "string",
"enum": [
"unsupported_diagram_kind",
"node_cap_exceeded"
]
},
"watermark": {
"type": "boolean"
},
"signed_in": {
"type": "boolean"
},
"engine_version": {
"type": "string"
},
"mermaid_version": {
"type": "string"
},
"open_url": {
"type": "string"
},
"svg": {
"type": "string"
},
"width": {
"type": "number"
},
"height": {
"type": "number"
},
"plan": {
"type": "string"
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"diagram": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string"
},
"visibility": {
"type": "string"
},
"version": {
"type": "number"
},
"url": {
"type": "string"
},
"workspace_id": {
"type": "string"
}
},
"additionalProperties": {}
},
"diagrams": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string"
},
"visibility": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"url": {
"type": "string"
},
"version": {
"type": "number"
},
"workspace": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"additionalProperties": {}
}
},
"additionalProperties": {}
}
},
"truncated": {
"type": "boolean"
}
},
"required": [
"schema_version",
"status"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": {}
}🟢get_diagram(diagram)
Fetch a published diagram's current Mermaid source by name or slug, and show it rendered. The returned source is stamped with the diagram's identity — keep the `line9:` frontmatter block when you edit it so that Line9 recognises the diagram when it is opened and published there instead of creating a new one. Requires Line9 sign-in. 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.
Eingabe-Schema
{
"type": "object",
"properties": {
"diagram": {
"type": "string",
"minLength": 1,
"description": "Diagram name, slug, or trailing public_ref."
}
},
"required": [
"diagram"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": {}
}Ausgabe-Schema
{
"type": "object",
"properties": {
"schema_version": {
"type": "number"
},
"status": {
"type": "string",
"enum": [
"ok",
"diagram_error",
"ambiguous",
"not_found",
"auth_required",
"forbidden",
"not_entitled",
"rate_limited",
"upstream",
"invalid_input",
"internal"
]
},
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"next": {
"type": "string"
},
"stage": {
"type": "string"
},
"line": {
"type": "number"
},
"column": {
"type": "number"
},
"current_version": {
"type": "number"
},
"candidates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"slug": {
"type": "string"
}
},
"additionalProperties": {}
}
}
},
"required": [
"code"
],
"additionalProperties": {}
},
"path": {
"type": "string",
"enum": [
"solve",
"plan"
]
},
"render_mode": {
"type": "string",
"enum": [
"line9",
"mermaid_fallback"
]
},
"diagram_type": {
"type": [
"string",
"null"
]
},
"source": {
"type": "string"
},
"config": {
"type": "object",
"properties": {
"theme": {
"type": "string"
},
"scale": {
"type": "object",
"properties": {
"node": {
"type": "number"
},
"spacing": {
"type": "number"
}
},
"additionalProperties": {}
},
"flowchart": {
"type": "object",
"properties": {
"direction": {
"type": "string"
},
"legend": {
"type": "string",
"enum": [
"on",
"off"
]
}
},
"additionalProperties": {}
}
},
"additionalProperties": {}
},
"orientation": {
"type": "string",
"enum": [
"TB",
"BT",
"LR",
"RL"
]
},
"controls": {
"type": "object",
"properties": {
"orientation": {
"type": "boolean"
},
"legend": {
"type": "boolean"
}
},
"additionalProperties": {}
},
"node_count": {
"type": "number"
},
"edge_count": {
"type": "number"
},
"stop_reason": {
"type": "string"
},
"fallback_reason": {
"type": "string",
"enum": [
"unsupported_diagram_kind",
"node_cap_exceeded"
]
},
"watermark": {
"type": "boolean"
},
"signed_in": {
"type": "boolean"
},
"engine_version": {
"type": "string"
},
"mermaid_version": {
"type": "string"
},
"open_url": {
"type": "string"
},
"svg": {
"type": "string"
},
"width": {
"type": "number"
},
"height": {
"type": "number"
},
"plan": {
"type": "string"
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"diagram": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string"
},
"visibility": {
"type": "string"
},
"version": {
"type": "number"
},
"url": {
"type": "string"
},
"workspace_id": {
"type": "string"
}
},
"additionalProperties": {}
},
"diagrams": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"slug": {
"type": "string"
},
"visibility": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"url": {
"type": "string"
},
"version": {
"type": "number"
},
"workspace": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"additionalProperties": {}
}
},
"additionalProperties": {}
}
},
"truncated": {
"type": "boolean"
}
},
"required": [
"schema_version",
"status"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": {}
}Empfohlene Prompts
get_diagramget_diagramlist_diagramslist_diagramslist_diagramsget_diagramCommunity
Nachweis