turbovault 1.2.7

Production-grade MCP server for Obsidian vault management - Transform your vault into an intelligent knowledge system for AI agents
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
//! Static resource documentation embedded directly in code.
//! These resources are served via MCP resources and tool endpoints.

/// Obsidian Flavored Markdown (OFM) complete syntax guide
pub const OFM_SYNTAX_GUIDE: &str = r#"# Obsidian Flavored Markdown (OFM) — Complete Syntax Guide

Obsidian Flavored Markdown extends CommonMark with Obsidian conventions that power vault-centric workflows, daily notes, and Zettelkasten knowledge bases. This guide provides comprehensive OFM syntax supported by `TurboVault` so tools, agents, and humans can produce high-quality, automation-friendly notes while maintaining full compatibility with standard Markdown.

## Core Philosophy

Obsidian strives for maximum capability without breaking any existing formats. As a result, it uses a combination of flavors of Markdown to provide enhanced functionality while maintaining compatibility. Within TurboVault:

- Prefer small, atomic notes that capture a single idea and link liberally
- Keep metadata explicit in YAML frontmatter or inline attribute blocks
- Treat backlinks, tags, and properties as first-class data that power graph analytics
- Maintain human readability: all OFM constructs remain valid Markdown

## Supported Standards

- **CommonMark** (full): The standardized version of Markdown with headings, emphasis, lists, blockquotes, code, tables
- **GitHub Flavored Markdown (GFM)**: GitHub's extension of CommonMark including task lists, strikethrough, and enhanced tables
- **LaTeX / MathJax**: Mathematical notation and advanced formatting support (inline `$math$` and block `$$math$$`)
- **YAML Frontmatter**: Parsed into strongly-typed note properties
- **Mermaid Diagrams**: Fenced blocks with language identifier `mermaid`

## Important Limitation

**Obsidian does NOT support using Markdown formatting or blank lines inside of HTML tags.** This is a critical constraint to remember when working with mixed HTML/Markdown content. Always keep HTML and Markdown formatting separate.

## Internal Linking System

Wikilinks create the foundation of your knowledge graph:

- **Standard wikilink**: `[[Note Title]]` — Creates a link to another note
- **Alias wikilink**: `[[Original Note|Readable Label]]` — Links with custom display text
- **Block reference link**: `[[Note Title#^block-id]]` — Links to specific blocks within notes using block references
- **Heading reference link**: `[[Note Title#Heading]]` — Links to specific headings within notes
- **File embed**: `![[Resource Note]]`, `![[image.png]]`, `![[document.pdf]]` — Embeds files directly into notes
- **Block embed**: `![[Note Title#^block-id]]` — Embeds specific blocks from other notes
- **External embed**: `![](https://example.com/media.png)` — Uses standard Markdown spec for external resources
- **Block identifier**: `^block-id` — Define a block identifier for linking (place at end of paragraph or list item)

## Text Formatting Extensions

OFM supports all standard Markdown formatting plus these Obsidian-specific extensions:

- **Bold**: `**bold text**`
- **Italic**: `_italic text_` or `*italic text*`
- **Strikethrough**: `~~strikethrough text~~` — Show deprecated or completed information
- **Highlight**: `==highlighted text==` — Emphasize key concepts with background highlighting
- **Comments**: `%%hidden comment text%%` — Comments hidden in preview mode, useful for developer notes and TODOs
- **Footnotes**: `[^id]` — Add footnote references and citations (define with `[^id]: Footnote content` at end of note)
- **Code span**: `` `inline code` ``

## Code and Content Blocks

### Code Blocks

Use fenced blocks with language identifiers for syntax highlighting and clarity:

```rust
fn example() -> Result<(), anyhow::Error> {
    Ok(())
}
```

Preferred languages include `rust`, `bash`, `json`, `yaml`, `toml`, `mermaid`, `graphviz`, `sql`, `python`, `javascript`.

### Task Lists

- Incomplete task: `- [ ] Draft system prompt`
- Completed task: `- [x] Publish v1.0 release notes`
- Nested tasks in lists are fully supported
- Dataview-style inline fields (`key:: value`) remain intact for downstream tooling

### Callouts (Admonitions)

Create highlighted information boxes with callouts:

```
> [!info] Optional Title
> Multi-line content with Markdown support.
> - Lists work fine
> - **Formatting works too**
```

Supported callout types: `note`, `abstract`, `info`, `tip`, `success`, `question`, `warning`, `failure`, `danger`, `bug`, `example`, `quote`. Unknown identifiers render as standard blockquotes.

### Tables

Advanced table formatting with alignment support:

```
| Feature       | Status | Notes                 |
| ------------- | ------ | --------------------- |
| Wikilinks     | ✅     | Full support          |
| Block refs    | ✅     | Unique IDs required   |
| Callouts      | ✅     | 12+ types supported   |
```

## Frontmatter and Metadata

### Mandatory Frontmatter Format

Every note should include YAML frontmatter:

```yaml
---
id: 20250101-unique-id              # Stable note identifier (REQUIRED, must be unique)
title: Optional human readable title
aliases:
  - Alternate name
tags: [project/alpha, reference/ofm]
created: 2025-01-01T10:00:00Z
updated: 2025-01-02T14:35:00Z
---
```

- `id` is required and must be unique per note
- `aliases` allows multiple wikilinkable names for a single note
- `tags` accept hierarchical syntax (`area/topic/subtopic`)
- Additional fields are stored and surfaced as properties
- Use ISO-8601 timestamps for `created` and `updated` fields

### Attribute Blocks

Store additional properties using attribute blocks (parsed into note properties):

```attr
status: evergreen
owner: nick
review_cycle: quarterly
next_review: 2025-04-01
```

Prefer lower_snake_case keys. These are equivalent to frontmatter and useful for inline property management.

## Advanced Linking Patterns

### Directional Relationships

Indicate relationships between notes:

- `[[note-a]] -> [[note-b]]` — Indicates directional edge from A to B
- `[[note-a]] <-> [[note-b]]` — Bidirectional relationship
- `[[Research Plan#Milestones]]` — Reference specific sections within notes

### Hub and Spoke Patterns

- Define hub notes with `tags: [moc]` for "Map of Contents"
- Alternative: `status: hub` property
- Hub notes aggregate and organize related atomic notes

## Graph-Friendly Conventions

Build knowledge graphs that scale with your vault:

- Use ISO-8601 date format for date-based notes (`2025-01-01`) for chronological ordering
- Keep notes atomic (one main idea per note)
- Link liberally to create discovery paths
- Define hub notes (`tags: [moc]`) to organize related topics
- Use block references for precise citations within notes
- Leverage backlinks and local graph visualization

## Best Practices

### Content Organization

- Maintain one H1 (`# Title`) per note that matches the canonical title
- Prefer sentence case headings (`## Daily Log`) for clarity
- Keep paragraph line length under 120 characters for diff readability and collaboration
- Store canonical links in frontmatter `links` array when needed

### Formatting Guidelines

- Use `<!--` HTML comments `-->` sparingly (they are ignored by parsers)
- Never place Markdown formatting inside HTML tags
- Use comments (`%%text%%`) for drafting notes that shouldn't appear in final output
- Use highlights (`==text==`) to emphasize key concepts without disrupting flow
- Use strikethrough (`~~text~~`) only for showing deprecated or completed information

### Automation-Friendly Practices

- Ensure every note has unique `id` in frontmatter
- Use consistent property naming (lower_snake_case)
- Use hierarchical tags (`project/alpha`, `area/topic/subtopic`)
- Leverage block IDs (`^block-id`) for precise linking
- Keep templates and examples in dedicated notes

## Technical Implementation

- OFM is built on top of CommonMark compliance
- Extensions are implemented without breaking existing Markdown parsers
- Block references use unique identifiers for precise targeting within notes
- Internal linking system creates a graph database of note relationships
- Wikilinks are resolved through note IDs and aliases at parse time
- The graph structure enables backlink tracking and relationship discovery

## Integration with Obsidian Features

TurboVault supports Obsidian's powerful built-in features:

- **Graph View**: Internal wikilinks automatically create visual connections between notes
- **Backlinks**: Automatic tracking of all references to a note (what links to this note)
- **Local Graph**: Focused view of connections around a specific note in context
- **Unlinked Mentions**: Find potential connections between notes based on text matching
- **Search and Replace**: Full-text search across the entire vault with regex support
- **Daily Notes**: Automatic creation of date-based notes following ISO-8601 convention
- **Zettelkasten**: Support for bidirectional linking and atomic note structure

## Common Patterns

### Daily Note Template

```
# {{title}}

## Wins
- [ ]

## Tasks
- [ ]

## Notes
-

## Related
- [[Previous Day]]
- [[Next Day]]
```

### Index / Map of Contents (MOC) Pattern

```yaml
---
id: 20250101-project-moc
title: Project Alpha - Map of Contents
tags: [moc, project/alpha]
---
```

Create hub notes that organize atomic notes by topic or project.

### Zettelkasten Pattern

- Each note has a unique ID (e.g., `20250101-101`)
- Short, atomic content (one idea per note)
- Rich interlinking with wikilinks and block references
- Enables knowledge discovery and serendipitous connections

## Related Tools and Resources

- `get_ofm_syntax_guide` — This complete guide
- `get_ofm_quick_ref` — Quick reference cheat sheet
- `get_ofm_examples` — Comprehensive example note with all features
- `obsidian://syntax/complete-guide` — Resource identifier for MCP clients

## Compatibility Considerations

- All OFM features are backward compatible with standard Markdown
- Content can be exported to various formats while preserving structure
- Internal wikilinks and block references are Obsidian-specific but degrade gracefully in other systems
- Comments (`%%text%%`) and highlights (`==text==`) may not render in all Markdown viewers
- HTML tags require careful handling (no nested Markdown formatting)

Ensure your automation respects this guide before emitting OFM content in production. When in doubt, refer to the original features or use the quick reference for common patterns.
"#;

/// Quick reference for Obsidian Flavored Markdown
pub const OFM_QUICK_REFERENCE: &str = r#"# Obsidian Flavored Markdown (OFM) Quick Reference

## Wikilinks
- `[[Note Title]]` - Link to note
- `[[Note Title|Display Text]]` - Link with custom label
- `[[Note Title#Heading]]` - Link to specific heading
- `[[Note Title#^block-id]]` - Link to specific block

## Text Formatting
- `**bold**` - Bold text
- `_italic_` or `*italic*` - Italic text
- `~~strikethrough~~` - Strikethrough text
- `==highlight==` - Highlighted text
- `` `code` `` - Inline code
- `%%comment%%` - Hidden comment

## Lists & Tasks
- `- item` - Unordered list
- `1. item` - Ordered list
- `- [ ] task` - Incomplete task
- `- [x] task` - Completed task

## Code Blocks
\`\`\`language
code here
\`\`\`

## Callouts (Admonitions)
\`\`\`
> [!type] Title
> Content here
\`\`\`

Supported types: `note`, `abstract`, `info`, `tip`, `success`, `question`, `warning`, `failure`, `danger`, `bug`, `example`, `quote`

## Tables
```
| Column 1 | Column 2 |
|----------|----------|
| Cell 1   | Cell 2   |
```

## Embeds & Media
- `![[Note Title]]` - Embed note
- `![[image.png]]` - Embed image
- `![[File.pdf]]` - Embed file

## Frontmatter (YAML)
```yaml
---
id: unique-identifier
title: Note Title
tags: [tag1, tag2]
aliases: [alt-name]
---
```

## Block References
- `^block-id` - Create block reference
- `[[Note#^block-id]]` - Link to block

## HTML & Comments
- `<!-- HTML comment -->` - Standard HTML comment
- Mix Markdown and HTML, but never nest Markdown inside HTML tags
"#;

/// Example note demonstrating OFM features
pub const OFM_EXAMPLE_NOTE: &str = r#"---
id: 20250106-ofm-example
title: Obsidian Flavored Markdown - Example Note
aliases: [OFM Example, Example Note]
tags: [example, reference/ofm, tutorial]
created: 2025-01-06T10:00:00Z
updated: 2025-01-06T14:30:00Z
---

# Obsidian Flavored Markdown - Example Note

This note demonstrates all major OFM features supported by TurboVault.

## Text Formatting

Here's a sentence with **bold text**, _italic text_, and ~~strikethrough~~. You can also use ==highlighted text== to emphasize important concepts, and `` `inline code` `` for technical terms.

%%This is a hidden comment that won't appear in preview mode. Great for drafting and internal notes!%%

## Wikilinks and References

Link to other notes using wikilinks:
- [[Example Note]] - Standard link
- [[Daily Note|Link with custom label]] - Link with custom display text
- [[Archive/Old Note#Findings]] - Link to specific heading
- [[Research#^important-finding]] - Link to specific block

## Embeds

You can embed entire notes:
![[Another Note]]

Or specific blocks:
![[Archive/Old Note#^block-id]]

Or images and media:
![[sample-image.png]]

## Lists and Tasks

### Unordered List
- First item
- Second item
  - Nested item
  - Another nested item
- Third item

### Ordered List
1. First step
2. Second step
   1. Sub-step A
   2. Sub-step B
3. Third step

### Task List
- [x] Completed task
- [ ] Incomplete task
- [ ] Another task
  - [x] Sub-task complete
  - [ ] Sub-task incomplete

## Code Blocks

Here's a Rust example:

```rust
fn example() -> Result<(), Box<dyn std::error::Error>> {
    println!("Hello, world!");
    Ok(())
}
```

JavaScript example:
```javascript
function greet(name) {
  return `Hello, ${name}!`;
}
```

SQL example:
```sql
SELECT id, title, created FROM notes
WHERE tags LIKE '%example%'
ORDER BY created DESC;
```

## Callouts (Admonitions)

> [!note] This is a note
> A note callout for general information.

> [!tip] Pro Tip
> A tip callout with helpful advice.

> [!warning] Be Careful
> A warning callout for important cautions.

> [!example] Example Callout
> This demonstrates an example callout type.

## Tables

| Feature | Status | Notes |
|---------|--------|-------|
| Wikilinks | ✅ | Full support |
| Embeds | ✅ | Files and blocks |
| Callouts | ✅ | 12+ types |
| Frontmatter | ✅ | YAML format |
| Math | ✅ | LaTeX notation |
| Tasks | ✅ | Nested support |

## Block References

This paragraph has a block reference identifier. ^example-block

You can link to this block using `[[OFM Example Note#^example-block]]`

## Nested Content Structure

### Section 1
Content for section 1.

### Section 2
Content for section 2.

#### Subsection 2.1
Nested content under section 2.

## Graphs and Diagrams

```mermaid
graph LR
    A[Start] --> B{Decision}
    B -->|Yes| C[Action 1]
    B -->|No| D[Action 2]
    C --> E[End]
    D --> E
```

## Related Notes

Links to other example content:
- [[Daily Note Template]]
- [[Map of Contents Example]]
- [[Zettelkasten Pattern]]

---

**Created:** 2025-01-06 | **Updated:** 2025-01-06 14:30 | **Version:** 1.0
"#;