FigJam Diagrams
Generate collaborative diagrams in FigJam using the generate_diagram MCP tool, which converts Mermaid.js syntax into editable FigJam boards.
Supported Diagram Types
| Type |
Mermaid Keyword |
Best For |
| Flowchart |
flowchart LR or graph LR |
Processes, user flows, system architecture |
| Decision Tree |
flowchart TD |
If/else logic, routing, triage workflows |
| Gantt Chart |
gantt |
Timelines, project plans, sprint roadmaps |
| Sequence Diagram |
sequenceDiagram |
API calls, auth flows, service interactions |
| State Diagram |
stateDiagram-v2 |
State machines, lifecycle tracking, status flows |
Not supported: Class diagrams, timelines, Venn diagrams, ER diagrams, pie charts, mindmaps, or other Mermaid types. Also cannot move individual shapes, change fonts, or do fine layout adjustments after generation — users should open the FigJam file for those edits.
Required Workflow
Step 1: Identify Diagram Type
Match the user's request to the best diagram type:
- Process / workflow / pipeline / how-it-works → Flowchart (
flowchart LR)
- Conditional logic / if-then / routing / triage → Decision Tree (
flowchart TD)
- Timeline / schedule / sprints / milestones → Gantt Chart (
gantt)
- API call chain / request-response / auth flow → Sequence Diagram (
sequenceDiagram)
- Status transitions / lifecycle / state machine → State Diagram (
stateDiagram-v2)
If ambiguous, default to flowchart — it's the most flexible.
Step 2: Write Mermaid Syntax
Follow these rules strictly — the generate_diagram tool will reject invalid syntax:
General rules (all diagram types):
- Do NOT use emojis in the Mermaid code
- Do NOT use
\n for newlines — use actual line breaks
- Keep diagrams simple unless the user asks for detail
- Only the 5 supported types are valid
Flowchart / Decision Tree rules:
- Use
LR (left-to-right) by default; use TD for decision trees
- Put ALL shape text and edge text in double quotes:
- Shapes:
A["Start"], B["Process Data"]
- Edge text:
A -->|"Yes"| B or A --"Label"--> B
- Color styling is allowed but use sparingly unless requested
- Full range of shapes available:
["rect"], ("rounded"), {"diamond"}, (["stadium"]), [["subroutine"]], (("circle")), >["flag"], {{"hexagon"}}
Gantt Chart rules:
- Do NOT use color styling in Gantt charts
- Format:
gantt
title Project Plan
dateFormat YYYY-MM-DD
section Phase 1
Task A :a1, 2026-02-17, 7d
Task B :after a1, 5d
Sequence Diagram rules:
State Diagram rules:
Step 3: Call generate_diagram
generate_diagram(
name="Short descriptive title",
mermaidSyntax="flowchart LR\n A[\"Start\"] --> B[\"End\"]"
)
Parameters:
name — Human-readable title (short but descriptive)
mermaidSyntax — Valid Mermaid.js code following the rules above
userIntent (optional) — Description of what the user wants
Step 4: Share Result
The tool returns a FigJam link. Share it with the user and mention they can:
- Open it in FigJam to edit, rearrange, and style
- Share with collaborators
- Add sticky notes, stamps, and annotations
Use Cases & Examples
For detailed examples for each diagram type and common startup/product use cases, see references/examples.md.
Quick Examples
User flow:
flowchart LR
A["Landing Page"] --> B["Sign Up"]
B --> C["Onboarding Wizard"]
C --> D["Dashboard"]
API auth flow:
sequenceDiagram
participant U as User
participant A as Auth Service
participant D as Database
U->>A: POST /login
A->>D: Validate credentials
D-->>A: User record
A-->>U: JWT token
Sprint plan:
gantt
title Sprint 12
dateFormat YYYY-MM-DD
section Backend
API endpoints :a1, 2026-02-17, 5d
Database migration :after a1, 3d
section Frontend
UI components :2026-02-17, 7d
Integration :2026-02-24, 4d
Tips
- Start simple — generate a minimal diagram first, then iterate
- Use subgraphs for complex flowcharts:
subgraph "Section Name" groups related nodes
- Color sparingly — only in flowcharts, and only when it adds clarity
- After generation, tell users to open in FigJam for fine-tuning (moving nodes, adding sticky notes, changing colors)
1---2name: figjam-diagrams3description: Generate collaborative diagrams in FigJam using Mermaid.js via the Figma MCP. Use when user wants to create flowcharts, decision trees, Gantt charts, sequence diagrams, or state diagrams in FigJam. Triggers on "create a diagram", "make a flowchart", "generate a decision tree", "Gantt chart", "sequence diagram", "state diagram", "FigJam diagram", "visualize this process", "map this workflow", or any request to diagram architecture, processes, user flows, or project timelines. Requires Figma MCP server connection.4---56# FigJam Diagrams78Generate collaborative diagrams in FigJam using the `generate_diagram` MCP tool, which converts Mermaid.js syntax into editable FigJam boards.910## Supported Diagram Types1112| Type | Mermaid Keyword | Best For |13|------|----------------|----------|14| Flowchart | `flowchart LR` or `graph LR` | Processes, user flows, system architecture |15| Decision Tree | `flowchart TD` | If/else logic, routing, triage workflows |16| Gantt Chart | `gantt` | Timelines, project plans, sprint roadmaps |17| Sequence Diagram | `sequenceDiagram` | API calls, auth flows, service interactions |18| State Diagram | `stateDiagram-v2` | State machines, lifecycle tracking, status flows |1920**Not supported:** Class diagrams, timelines, Venn diagrams, ER diagrams, pie charts, mindmaps, or other Mermaid types. Also cannot move individual shapes, change fonts, or do fine layout adjustments after generation — users should open the FigJam file for those edits.2122## Required Workflow2324### Step 1: Identify Diagram Type2526Match the user's request to the best diagram type:2728- **Process / workflow / pipeline / how-it-works** → Flowchart (`flowchart LR`)29- **Conditional logic / if-then / routing / triage** → Decision Tree (`flowchart TD`)30- **Timeline / schedule / sprints / milestones** → Gantt Chart (`gantt`)31- **API call chain / request-response / auth flow** → Sequence Diagram (`sequenceDiagram`)32- **Status transitions / lifecycle / state machine** → State Diagram (`stateDiagram-v2`)3334If ambiguous, default to flowchart — it's the most flexible.3536### Step 2: Write Mermaid Syntax3738Follow these rules strictly — the `generate_diagram` tool will reject invalid syntax:3940**General rules (all diagram types):**41- Do NOT use emojis in the Mermaid code42- Do NOT use `\n` for newlines — use actual line breaks43- Keep diagrams simple unless the user asks for detail44- Only the 5 supported types are valid4546**Flowchart / Decision Tree rules:**47- Use `LR` (left-to-right) by default; use `TD` for decision trees48- Put ALL shape text and edge text in double quotes:49 - Shapes: `A["Start"]`, `B["Process Data"]`50 - Edge text: `A -->|"Yes"| B` or `A --"Label"--> B`51- Color styling is allowed but use sparingly unless requested52- Full range of shapes available: `["rect"]`, `("rounded")`, `{"diamond"}`, `(["stadium"])`, `[["subroutine"]]`, `(("circle"))`, `>["flag"]`, `{{"hexagon"}}`5354**Gantt Chart rules:**55- Do NOT use color styling in Gantt charts56- Format:57 ```58 gantt59 title Project Plan60 dateFormat YYYY-MM-DD61 section Phase 162 Task A :a1, 2026-02-17, 7d63 Task B :after a1, 5d64 ```6566**Sequence Diagram rules:**67- Do NOT use `note` statements (notes are not supported)68- Format:69 ```70 sequenceDiagram71 participant A as Client72 participant B as Server73 A->>B: Request74 B-->>A: Response75 ```7677**State Diagram rules:**78- Use `stateDiagram-v2` (not `stateDiagram`)79- Do NOT use the word `end` in class names80- Format:81 ```82 stateDiagram-v283 [*] --> Idle84 Idle --> Processing: start85 Processing --> Done: complete86 Done --> [*]87 ```8889### Step 3: Call generate_diagram9091```92generate_diagram(93 name="Short descriptive title",94 mermaidSyntax="flowchart LR\n A[\"Start\"] --> B[\"End\"]"95)96```9798Parameters:99- `name` — Human-readable title (short but descriptive)100- `mermaidSyntax` — Valid Mermaid.js code following the rules above101- `userIntent` (optional) — Description of what the user wants102103### Step 4: Share Result104105The tool returns a FigJam link. Share it with the user and mention they can:106- Open it in FigJam to edit, rearrange, and style107- Share with collaborators108- Add sticky notes, stamps, and annotations109110## Use Cases & Examples111112For detailed examples for each diagram type and common startup/product use cases, see [references/examples.md](references/examples.md).113114### Quick Examples115116**User flow:**117```118flowchart LR119 A["Landing Page"] --> B["Sign Up"]120 B --> C["Onboarding Wizard"]121 C --> D["Dashboard"]122```123124**API auth flow:**125```126sequenceDiagram127 participant U as User128 participant A as Auth Service129 participant D as Database130 U->>A: POST /login131 A->>D: Validate credentials132 D-->>A: User record133 A-->>U: JWT token134```135136**Sprint plan:**137```138gantt139 title Sprint 12140 dateFormat YYYY-MM-DD141 section Backend142 API endpoints :a1, 2026-02-17, 5d143 Database migration :after a1, 3d144 section Frontend145 UI components :2026-02-17, 7d146 Integration :2026-02-24, 4d147```148149## Tips150151- **Start simple** — generate a minimal diagram first, then iterate152- **Use subgraphs** for complex flowcharts: `subgraph "Section Name"` groups related nodes153- **Color sparingly** — only in flowcharts, and only when it adds clarity154- **After generation**, tell users to open in FigJam for fine-tuning (moving nodes, adding sticky notes, changing colors)