media-forge
v0.2.0MCP server for generating diagrams, charts, presentations, and animations for Markdown documentation
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_tool_guide
Get usage guide for a rendering tool — includes examples, anti-patterns to avoid, complexity limits, and tips. Call this BEFORE your first render to avoid common mistakes. Available guides: mermaid, d2, graphviz, vegalite, html_page, slides (or "all" for a summary).
| Parameter | Type | Description |
|---|---|---|
tool_name * | string | Tool to get guide for: "mermaid", "d2", "graphviz", "vegalite", "html_page", "slides", or "all" |
render_mermaid
Render a Mermaid diagram to SVG or PNG. Supports: flowchart, sequenceDiagram, erDiagram, stateDiagram-v2, gantt, pie, gitGraph, classDiagram, journey, mindmap. IMPORTANT: Code must start with diagram type (e.g., 'flowchart TD'). Do NOT use semicolons. Do NOT use HTML tags in labels. Anti-patterns: 'graph' (use 'flowchart'), unquoted special chars in labels, >25 nodes without subgraphs. Call get_tool_guide('mermaid') for examples and full anti-pattern list.
| Parameter | Type | Description |
|---|---|---|
code * | string | Mermaid diagram code. Must start with diagram type declaration (e.g., 'flowchart TD', 'sequenceDiagram'). No semicolons. |
format | string | Output format. SVG preferred (smaller, git-friendly diffs) |
theme | string | Mermaid theme. 'neutral' best for docs, 'forest' for dark backgrounds |
render_d2
Render a D2 architecture diagram to SVG or PNG. Best for: architecture diagrams with containers, nested groups, icons, and complex layouts. IMPORTANT: D2 syntax is NOT Mermaid. Use '->' for arrows (not '-->'), containers with 'name: { ... }' (not 'subgraph'). Anti-patterns: Mermaid syntax, unbalanced braces, >3 nesting levels. Call get_tool_guide('d2') for examples.
| Parameter | Type | Description |
|---|---|---|
code * | string | D2 diagram code. Use '->' for arrows, 'name: { ... }' for containers. NOT Mermaid syntax. |
format | string | Output format. SVG preferred. PNG is slower (requires Chromium conversion). |
layout | string | Layout engine. dagre=hierarchical (default), elk=complex layouts with many crossings |
theme | number | D2 theme ID: 0=default, 1=neutral-grey, 3=terminal, 100=neutral-default |
render_graphviz
Render a Graphviz DOT diagram to SVG or PNG. Best for: dependency graphs, network diagrams, tree structures, large auto-layout graphs (100+ nodes). IMPORTANT: Source must be wrapped in 'digraph G { ... }' or 'graph G { ... }'. Use '->' with digraph, '--' with graph. Engine guide: dot=hierarchical, neato=spring, fdp=force-directed, sfdp=large graphs, circo=circular, twopi=radial. Call get_tool_guide('graphviz') for examples.
| Parameter | Type | Description |
|---|---|---|
dot_source * | string | Graphviz DOT source. Must start with 'digraph G {' or 'graph G {'. Use '->' for directed, '--' for undirected. |
engine | string | Layout engine: dot=hierarchical, neato=spring, fdp=force-directed, sfdp=large, circo=circular, twopi=radial |
format | string | Output format. SVG preferred. |
render_chart
Render a Vega-Lite chart to SVG or PNG. Supports: bar, line, point (scatter), area, rect (heatmap), boxplot, and layered/composite charts. IMPORTANT: spec_json must be valid JSON with "$schema", "data", "mark", and "encoding" fields. Anti-patterns: missing $schema, omitting encoding types, >500 inline data rows. Call get_tool_guide('vegalite') for examples.
| Parameter | Type | Description |
|---|---|---|
spec_json * | string | Vega-Lite JSON spec (as string). Must include "$schema", "data", "mark", "encoding". Always specify encoding types (quantitative/nominal/temporal/ordinal). |
format | string | Output format. SVG preferred. |
scale | number | Scale factor for PNG (default: 1). Use 2 for retina-crisp output. |
render_html_page
Render a self-contained themed HTML page from body content. No Docker required. Wraps your HTML in a design system with typography, depth tiers, cards, grids, KPIs, badges, and section navigation. IMPORTANT: body_html is the INNER content only — do NOT include <html>, <head>, or <body> tags. Use mf- prefixed CSS classes: mf-hero, mf-elevated, mf-card, mf-grid, mf-kpi, mf-badge-success, etc. Themes: swiss (clean docs), midnight (presentations), warm (reports), terminal (dev content). Call get_tool_guide('html_page') for design system reference and examples.
| Parameter | Type | Description |
|---|---|---|
body_html * | string | HTML body content (inner content only, no <html>/<head>/<body>). Use mf- prefixed classes for styling. |
title * | string | Page title (shown in header and browser tab) |
description | string | Page description (shown below title and in meta tag) |
nav_sections | array | Section names for floating navigation. Must match id attributes on <section> elements in body_html. |
theme | string | Visual theme: swiss=clean docs, midnight=dark editorial, warm=cream reports, terminal=dev monospace |
render_slides
Render a self-contained HTML slide deck with keyboard/touch navigation, progress bar, and transitions. No Docker required. Supports 8 slide types: title, content, split, code, quote, kpi, image, section. IMPORTANT: slides is a JSON array string of objects with title, content (HTML), and optional type. Content density limits: max 6 bullets per slide, max 10 code lines, max 25 words for quotes, max 30 slides total. Call get_tool_guide('slides') for slide type reference and examples.
| Parameter | Type | Description |
|---|---|---|
slides * | string | JSON array of slide objects: [{"title": "...", "content": "HTML...", "type": "content|title|split|code|quote|kpi|image|section"}] |
title * | string | Presentation title |
author | string | Author name (shown on title slide) |
theme | string | Visual theme for the slide deck |
list_assets
List all generated media assets in the output directory.
| Parameter | Type | Description |
|---|---|---|
directory | string | Subdirectory to list (default: docs/generated) |