Servidor MCP

Line9

ai.line9/diagrams

Qué hace este MCP

Renders Mermaid diagrams with Line9 layouts and retrieves diagrams from connected workspaces.

get_diagram
Get a 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.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['diagram'], 'properties': {'diagram': {'type': 'string', 'minLength': 1, 'description': 'Diagram name, slug, or trailing public_ref.'}}, 'additionalProperties': {}}
Esquema de salida
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['schema_version', 'status'], 'properties': {'svg': {'type': 'string'}, 'path': {'enum': ['solve', 'plan'], 'type': 'string'}, 'plan': {'type': 'string'}, 'error': {'type': 'object', 'required': ['code'], 'properties': {'code': {'type': 'string'}, 'line': {'type': 'number'}, 'next': {'type': 'string'}, 'stage': {'type': 'string'}, 'column': {'type': 'number'}, 'message': {'type': 'string'}, 'candidates': {'type': 'array', 'items': {'type': 'object', 'properties': {'name': {'type': 'string'}, 'slug': {'type': 'string'}}, 'additionalProperties': {}}}, 'current_version': {'type': 'number'}}, 'additionalProperties': {}}, 'width': {'type': 'number'}, 'config': {'type': 'object', 'properties': {'scale': {'type': 'object', 'properties': {'node': {'type': 'number'}, 'spacing': {'type': 'number'}}, 'additionalProperties': {}}, 'theme': {'type': 'string'}, 'flowchart': {'type': 'object', 'properties': {'legend': {'enum': ['on', 'off'], 'type': 'string'}, 'direction': {'type': 'string'}}, 'additionalProperties': {}}}, 'additionalProperties': {}}, 'height': {'type': 'number'}, 'source': {'type': 'string'}, 'status': {'enum': ['ok', 'diagram_error', 'ambiguous', 'not_found', 'auth_required', 'forbidden', 'not_entitled', 'rate_limited', 'upstream', 'invalid_input', 'internal'], 'type': 'string'}, 'diagram': {'type': 'object', 'properties': {'id': {'type': 'string'}, 'url': {'type': 'string'}, 'name': {'type': 'string'}, 'slug': {'type': 'string'}, 'version': {'type': 'number'}, 'visibility': {'type': 'string'}, 'workspace_id': {'type': 'string'}}, 'additionalProperties': {}}, 'controls': {'type': 'object', 'properties': {'legend': {'type': 'boolean'}, 'orientation': {'type': 'boolean'}}, 'additionalProperties': {}}, 'diagrams': {'type': 'array', 'items': {'type': 'object', 'properties': {'id': {'type': 'string'}, 'url': {'type': 'string'}, 'name': {'type': 'string'}, 'slug': {'type': 'string'}, 'version': {'type': 'number'}, 'workspace': {'type': 'object', 'properties': {'id': {'type': 'string'}, 'name': {'type': 'string'}}, 'additionalProperties': {}}, 'updated_at': {'type': 'string'}, 'visibility': {'type': 'string'}}, 'additionalProperties': {}}}, 'open_url': {'type': 'string'}, 'warnings': {'type': 'array', 'items': {'type': 'string'}}, 'signed_in': {'type': 'boolean'}, 'truncated': {'type': 'boolean'}, 'watermark': {'type': 'boolean'}, 'edge_count': {'type': 'number'}, 'node_count': {'type': 'number'}, 'orientation': {'enum': ['TB', 'BT', 'LR', 'RL'], 'type': 'string'}, 'render_mode': {'enum': ['line9', 'mermaid_fallback'], 'type': 'string'}, 'stop_reason': {'type': 'string'}, 'diagram_type': {'type': ['string', 'null']}, 'engine_version': {'type': 'string'}, 'schema_version': {'type': 'number'}, 'fallback_reason': {'enum': ['unsupported_diagram_kind', 'node_cap_exceeded'], 'type': 'string'}, 'mermaid_version': {'type': 'string'}}, 'additionalProperties': {}}
list_diagrams
List my diagrams
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.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'limit': {'type': 'integer', 'maximum': 100, 'minimum': 1, 'description': 'Maximum rows to return (1â\x80\x93100; default 50).'}, 'query': {'type': 'string', 'description': 'Case-insensitive substring of the diagram name.'}}, 'additionalProperties': {}}
Esquema de salida
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['schema_version', 'status'], 'properties': {'svg': {'type': 'string'}, 'path': {'enum': ['solve', 'plan'], 'type': 'string'}, 'plan': {'type': 'string'}, 'error': {'type': 'object', 'required': ['code'], 'properties': {'code': {'type': 'string'}, 'line': {'type': 'number'}, 'next': {'type': 'string'}, 'stage': {'type': 'string'}, 'column': {'type': 'number'}, 'message': {'type': 'string'}, 'candidates': {'type': 'array', 'items': {'type': 'object', 'properties': {'name': {'type': 'string'}, 'slug': {'type': 'string'}}, 'additionalProperties': {}}}, 'current_version': {'type': 'number'}}, 'additionalProperties': {}}, 'width': {'type': 'number'}, 'config': {'type': 'object', 'properties': {'scale': {'type': 'object', 'properties': {'node': {'type': 'number'}, 'spacing': {'type': 'number'}}, 'additionalProperties': {}}, 'theme': {'type': 'string'}, 'flowchart': {'type': 'object', 'properties': {'legend': {'enum': ['on', 'off'], 'type': 'string'}, 'direction': {'type': 'string'}}, 'additionalProperties': {}}}, 'additionalProperties': {}}, 'height': {'type': 'number'}, 'source': {'type': 'string'}, 'status': {'enum': ['ok', 'diagram_error', 'ambiguous', 'not_found', 'auth_required', 'forbidden', 'not_entitled', 'rate_limited', 'upstream', 'invalid_input', 'internal'], 'type': 'string'}, 'diagram': {'type': 'object', 'properties': {'id': {'type': 'string'}, 'url': {'type': 'string'}, 'name': {'type': 'string'}, 'slug': {'type': 'string'}, 'version': {'type': 'number'}, 'visibility': {'type': 'string'}, 'workspace_id': {'type': 'string'}}, 'additionalProperties': {}}, 'controls': {'type': 'object', 'properties': {'legend': {'type': 'boolean'}, 'orientation': {'type': 'boolean'}}, 'additionalProperties': {}}, 'diagrams': {'type': 'array', 'items': {'type': 'object', 'properties': {'id': {'type': 'string'}, 'url': {'type': 'string'}, 'name': {'type': 'string'}, 'slug': {'type': 'string'}, 'version': {'type': 'number'}, 'workspace': {'type': 'object', 'properties': {'id': {'type': 'string'}, 'name': {'type': 'string'}}, 'additionalProperties': {}}, 'updated_at': {'type': 'string'}, 'visibility': {'type': 'string'}}, 'additionalProperties': {}}}, 'open_url': {'type': 'string'}, 'warnings': {'type': 'array', 'items': {'type': 'string'}}, 'signed_in': {'type': 'boolean'}, 'truncated': {'type': 'boolean'}, 'watermark': {'type': 'boolean'}, 'edge_count': {'type': 'number'}, 'node_count': {'type': 'number'}, 'orientation': {'enum': ['TB', 'BT', 'LR', 'RL'], 'type': 'string'}, 'render_mode': {'enum': ['line9', 'mermaid_fallback'], 'type': 'string'}, 'stop_reason': {'type': 'string'}, 'diagram_type': {'type': ['string', 'null']}, 'engine_version': {'type': 'string'}, 'schema_version': {'type': 'number'}, 'fallback_reason': {'enum': ['unsupported_diagram_kind', 'node_cap_exceeded'], 'type': 'string'}, 'mermaid_version': {'type': 'string'}}, 'additionalProperties': {}}
render_diagram
Render diagram
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.
Solo lectura Idempotente
Esquema de entrada
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['source'], 'properties': {'plan': {'type': 'string', 'description': 'Opaque plan from a previous result (widget use). A hint only: skips the solve when it still fits the source.'}, 'source': {'type': 'string', 'minLength': 1, 'description': 'Mermaid source. Optional YAML frontmatter is honoured â\x80\x94 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.'}}, 'additionalProperties': {}}
Esquema de salida
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['schema_version', 'status'], 'properties': {'svg': {'type': 'string'}, 'path': {'enum': ['solve', 'plan'], 'type': 'string'}, 'plan': {'type': 'string'}, 'error': {'type': 'object', 'required': ['code'], 'properties': {'code': {'type': 'string'}, 'line': {'type': 'number'}, 'next': {'type': 'string'}, 'stage': {'type': 'string'}, 'column': {'type': 'number'}, 'message': {'type': 'string'}, 'candidates': {'type': 'array', 'items': {'type': 'object', 'properties': {'name': {'type': 'string'}, 'slug': {'type': 'string'}}, 'additionalProperties': {}}}, 'current_version': {'type': 'number'}}, 'additionalProperties': {}}, 'width': {'type': 'number'}, 'config': {'type': 'object', 'properties': {'scale': {'type': 'object', 'properties': {'node': {'type': 'number'}, 'spacing': {'type': 'number'}}, 'additionalProperties': {}}, 'theme': {'type': 'string'}, 'flowchart': {'type': 'object', 'properties': {'legend': {'enum': ['on', 'off'], 'type': 'string'}, 'direction': {'type': 'string'}}, 'additionalProperties': {}}}, 'additionalProperties': {}}, 'height': {'type': 'number'}, 'source': {'type': 'string'}, 'status': {'enum': ['ok', 'diagram_error', 'ambiguous', 'not_found', 'auth_required', 'forbidden', 'not_entitled', 'rate_limited', 'upstream', 'invalid_input', 'internal'], 'type': 'string'}, 'diagram': {'type': 'object', 'properties': {'id': {'type': 'string'}, 'url': {'type': 'string'}, 'name': {'type': 'string'}, 'slug': {'type': 'string'}, 'version': {'type': 'number'}, 'visibility': {'type': 'string'}, 'workspace_id': {'type': 'string'}}, 'additionalProperties': {}}, 'controls': {'type': 'object', 'properties': {'legend': {'type': 'boolean'}, 'orientation': {'type': 'boolean'}}, 'additionalProperties': {}}, 'diagrams': {'type': 'array', 'items': {'type': 'object', 'properties': {'id': {'type': 'string'}, 'url': {'type': 'string'}, 'name': {'type': 'string'}, 'slug': {'type': 'string'}, 'version': {'type': 'number'}, 'workspace': {'type': 'object', 'properties': {'id': {'type': 'string'}, 'name': {'type': 'string'}}, 'additionalProperties': {}}, 'updated_at': {'type': 'string'}, 'visibility': {'type': 'string'}}, 'additionalProperties': {}}}, 'open_url': {'type': 'string'}, 'warnings': {'type': 'array', 'items': {'type': 'string'}}, 'signed_in': {'type': 'boolean'}, 'truncated': {'type': 'boolean'}, 'watermark': {'type': 'boolean'}, 'edge_count': {'type': 'number'}, 'node_count': {'type': 'number'}, 'orientation': {'enum': ['TB', 'BT', 'LR', 'RL'], 'type': 'string'}, 'render_mode': {'enum': ['line9', 'mermaid_fallback'], 'type': 'string'}, 'stop_reason': {'type': 'string'}, 'diagram_type': {'type': ['string', 'null']}, 'engine_version': {'type': 'string'}, 'schema_version': {'type': 'number'}, 'fallback_reason': {'enum': ['unsupported_diagram_kind', 'node_cap_exceeded'], 'type': 'string'}, 'mermaid_version': {'type': 'string'}}, 'additionalProperties': {}}
Añadido
get_diagram
18 de September de 2026 a las 02:40
Añadido
list_diagrams
18 de September de 2026 a las 02:40
Añadido
render_diagram
18 de September de 2026 a las 02:40