Create and edit hierarchical mindmap to organize ideas and visualize concepts using specific JSON structures...
Create hierarchical mindmaps by generating specific structured JSON content. Automatically handles common syntax pitfalls (list syntax conflicts) to ensure diagrams render correctly in TriliumNext Note / Trilium Note.
nodeData hierarchy must have a unique id string (e.g., "root", "sub1", "sub2").children: [] array.topic must be plain text. Avoid Markdown or HTML tags inside the JSON strings.direction must be 0 (left) or 1 (right). Do not use strings like "left".root ID.AVOID RADIAL (Two-sided) LAYOUTS in most cases. Radial layouts often create:
Perfect for:
Why it works:
Examples:
Perfect for:
Examples:
Only use when:
Examples:
| Content Type | Recommended Layout | Reasoning |
|---|---|---|
| Video summaries | LEFT-SIDED | Breaking down topics into central concept |
| Technology reviews | LEFT-SIDED | Analysis flows into main subject |
| Educational content | LEFT-SIDED | Natural learning progression |
| Process documentation | RIGHT-SIDED | Sequential flow from start to end |
| Comparison studies | LEFT-SIDED (usually) | Unless true 50/50 comparison |
| Research analysis | LEFT-SIDED | Findings flow into main topic |
| Feature breakdowns | LEFT-SIDED | Components flow into main product |
Ask yourself:
Default choice: When in doubt, use LEFT-SIDED layout. It works for 80% of use cases and avoids visual complexity.
children: []Generate a JSON object with this essential structure:
{
"nodeData": {
"id": "root",
"topic": "Central Topic",
"direction": 0,
"children": []
}
}
ā ļø Critical Note Configuration
You must use the exact parameters below. Do not deviate.
- Function: Notes
- Type: mindMap (Strictly. Do NOT use "noteMap" or "mermaid")
- MIME: application/json
ā Negative Constraints (Common Failures)
- NEVER use type: "noteMap": This is for directory structures and requires empty content. Using this will cause a CONTENT_VALIDATION_ERROR.
- NEVER use type: "mermaid": This parser cannot read JSON. It will result in a rendering error.
- NEVER use type: "code": This will display raw text rather than the visual map.
---
### 2. Fix `references/mindmap-schema.md`
Add an "Integration Guide" section at the top or bottom of the schema file. This gives the AI context on *how* this JSON is consumed by the application, reinforcing the correct MIME type.
**Add this section to `references/mindmap-schema.md`:**
```markdown
## Trilium Integration Requirements
To render this JSON schema as a visual mindmap in Trilium/TriliumNext, the note must be created with specific attributes.
### Required Note Attributes
| Attribute | Value | Reason |
|-----------|-------|--------|
| **type** | `"mindMap"` | Triggers the canvas rendering engine. |
| **mime** | `"application/json"` | Tells the system to parse content as a JSON object. |
### ā Forbidden Types
* **`noteMap`**: This is a different visualization engine for Note Hierarchies (file trees). It throws an error if content is provided.
* **`mermaid`**: This engine expects text-based syntax (e.g., `graph TD`), not JSON.
### Key Requirements
- **Tool**: Use `create_note` with `type: "mindMap"` and `mime: "application/json"`
- **Directions**: `0` = left, `1` = right, `2` = both (for root in radial)
- **IDs**: Must be unique strings for each node
- **Children**: Always include empty `children: []` array for leaf nodes
## References
For detailed syntax rules and troubleshooting, see:
- [references/mindmap-schema.md](references/mindmap-schema.md) - Complete syntax reference for mindmap.