Skip to content

API Reference

Complete reference for all 47 tools provided by Another bloated Obsidian MCP Server.

Table of Contents


Vault Management

Tools for managing Obsidian vaults. Tool group: vault

list_vaults

List all configured Obsidian vaults and show which one is currently active.

Parameters

None required.

Returns

json
{
  "vaults": ["personal", "work"],
  "active": "personal",
  "details": [
    { "name": "personal", "path": "/path/to/personal" },
    { "name": "work", "path": "/path/to/work" }
  ]
}

Example Request

json
{
  "name": "list_vaults",
  "arguments": {}
}

set_active_vault

Set the active vault for subsequent operations.

Parameters

ParameterTypeRequiredDefaultDescription
vaultstringYes-Name of the vault to set as active

Returns

json
{
  "success": true,
  "vault": "work"
}

Example Request

json
{
  "name": "set_active_vault",
  "arguments": {
    "vault": "work"
  }
}

Error Codes

  • VAULT_NOT_FOUND: The specified vault does not exist

register_vault

Register a new Obsidian vault with a name and path.

Parameters

ParameterTypeRequiredDefaultDescription
namestringYes-Name to identify the vault
pathstringYes-Absolute path to the vault directory

Returns

json
{
  "success": true,
  "message": "Vault \"research\" registered at /path/to/research"
}

Example Request

json
{
  "name": "register_vault",
  "arguments": {
    "name": "research",
    "path": "/Users/you/Obsidian/Research"
  }
}

Edge Cases

  • Path must be absolute, not relative
  • Path must contain a .obsidian folder
  • Vault name must be unique

Notes

Tools for CRUD operations on notes. Tool group: notes

list_notes

List markdown notes in the vault with sorting, filtering, and pagination.

Parameters

ParameterTypeRequiredDefaultDescription
folderstringNo-Filter notes by folder path
recursivebooleanNotrueInclude notes in subfolders
sortBystringNo"modified"Sort by: "name", "modified", or "created"
sortOrderstringNo"desc"Sort order: "asc" or "desc"
limitnumberNo-Maximum number of notes to return
offsetnumberNo0Number of notes to skip (pagination)
namePatternstringNo-Filter notes by name (regex pattern)

Returns

json
{
  "notes": [
    {
      "path": "Projects/MyProject.md",
      "name": "MyProject",
      "modified": "2024-01-15T10:30:00.000Z",
      "created": "2024-01-01T08:00:00.000Z",
      "size": 2048
    }
  ],
  "count": 1,
  "total": 150,
  "hasMore": true
}

Example Request

json
{
  "name": "list_notes",
  "arguments": {
    "folder": "Projects",
    "sortBy": "modified",
    "limit": 10
  }
}

read_note

Read the content and frontmatter of a specific note.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the note (relative to vault root)

Returns

json
{
  "path": "Projects/MyProject.md",
  "content": "# My Project\n\nProject description...",
  "frontmatter": {
    "tags": ["project", "active"],
    "status": "in-progress"
  }
}

Example Request

json
{
  "name": "read_note",
  "arguments": {
    "path": "Projects/MyProject.md"
  }
}

Error Codes

  • NOTE_NOT_FOUND: The specified note does not exist
  • PATH_TRAVERSAL: Attempted path traversal attack detected

create_note

Create a new markdown note in the vault.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path for the new note
contentstringYes-Markdown content for the note
frontmatterobjectNo-YAML frontmatter as key-value pairs

Returns

json
{
  "success": true,
  "path": "Projects/NewProject.md"
}

Example Request

json
{
  "name": "create_note",
  "arguments": {
    "path": "Projects/NewProject.md",
    "content": "# New Project\n\nDescription here.",
    "frontmatter": {
      "tags": ["project"],
      "status": "planning"
    }
  }
}

Edge Cases

  • Parent directories are created automatically
  • .md extension is added if not provided
  • Fails if note already exists

Error Codes

  • NOTE_EXISTS: A note already exists at the specified path
  • INVALID_PATH: The path contains invalid characters

update_note

Update an existing note with different modes.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the note
contentstringYes-New content or replacement text
modestringNo"overwrite"Update mode: "overwrite", "append", "prepend", "replace"
searchstringNo-Text to search for (required for replace mode)
replaceAllbooleanNofalseReplace all occurrences
useRegexbooleanNofalseTreat search as regex
ignoreFrontmatterConflictbooleanNofalseForce prepend even if content starts with "---"

Returns

json
{
  "success": true,
  "path": "Projects/MyProject.md",
  "mode": "append"
}

For replace mode:

json
{
  "success": true,
  "path": "Projects/MyProject.md",
  "mode": "replace",
  "replacements": 3
}

Example Request - Append

json
{
  "name": "update_note",
  "arguments": {
    "path": "Projects/MyProject.md",
    "content": "\n## New Section\n\nAdditional content.",
    "mode": "append"
  }
}

Example Request - Find and Replace

json
{
  "name": "update_note",
  "arguments": {
    "path": "Projects/MyProject.md",
    "content": "completed",
    "mode": "replace",
    "search": "in-progress",
    "replaceAll": true
  }
}

Edge Cases

  • Replace mode requires the search parameter
  • Prepend mode errors if content starts with "---" (use ignoreFrontmatterConflict to override)

Error Codes

  • NOTE_NOT_FOUND: The note does not exist
  • FRONTMATTER_CONFLICT: Prepend content conflicts with frontmatter

delete_note

Permanently delete a note from the vault.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the note to delete

Returns

json
{
  "success": true,
  "deleted": "Projects/OldProject.md"
}

Example Request

json
{
  "name": "delete_note",
  "arguments": {
    "path": "Projects/OldProject.md"
  }
}

Edge Cases

  • This action cannot be undone
  • Does not update links in other notes

Error Codes

  • NOTE_NOT_FOUND: The note does not exist

rename_note

Rename a note and optionally update all wikilinks that reference it.

Parameters

ParameterTypeRequiredDefaultDescription
oldPathstringYes-Current path of the note
newPathstringYes-New path for the note
updateLinksbooleanNotrueUpdate wikilinks in other notes

Returns

json
{
  "success": true,
  "oldPath": "Projects/OldName.md",
  "newPath": "Projects/NewName.md",
  "linksUpdated": 5
}

Example Request

json
{
  "name": "rename_note",
  "arguments": {
    "oldPath": "Projects/OldName.md",
    "newPath": "Projects/NewName.md",
    "updateLinks": true
  }
}

Error Codes

  • NOTE_NOT_FOUND: The source note does not exist
  • NOTE_EXISTS: A note already exists at the new path

move_note

Move a note to a different folder.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the note to move
destinationFolderstringYes-Destination folder (use "" for root)
updateLinksbooleanNotrueUpdate wikilinks in other notes

Returns

json
{
  "success": true,
  "oldPath": "Inbox/Note.md",
  "newPath": "Projects/Note.md",
  "destinationFolder": "Projects",
  "linksUpdated": 2
}

Example Request

json
{
  "name": "move_note",
  "arguments": {
    "path": "Inbox/Note.md",
    "destinationFolder": "Projects",
    "updateLinks": true
  }
}

Tools for searching vault content. Tool group: search

search_vault

Search for text across all notes in the vault.

Parameters

ParameterTypeRequiredDefaultDescription
querystringYes-Text to search for (or regex if useRegex=true)
caseSensitivebooleanNofalseCase-sensitive search
folderstringNo-Limit search to a specific folder
maxResultsnumberNo50Maximum number of files to return
useRegexbooleanNofalseTreat query as regular expression
contextLinesnumberNo0Lines to include before/after each match

Returns

json
{
  "query": "project",
  "resultCount": 15,
  "results": [
    {
      "path": "Projects/MyProject.md",
      "matches": [
        {
          "line": 5,
          "content": "This is my main project for 2024.",
          "context": {
            "before": ["## Overview"],
            "after": ["It focuses on..."]
          }
        }
      ]
    }
  ]
}

Example Request

json
{
  "name": "search_vault",
  "arguments": {
    "query": "TODO|FIXME",
    "useRegex": true,
    "contextLines": 2
  }
}

Frontmatter

Tools for managing YAML frontmatter. Tool group: frontmatter

get_frontmatter

Get the YAML frontmatter of a note as a JSON object.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the note

Returns

json
{
  "path": "Projects/MyProject.md",
  "frontmatter": {
    "tags": ["project", "active"],
    "status": "in-progress",
    "created": "2024-01-01"
  },
  "hasFrontmatter": true
}

Example Request

json
{
  "name": "get_frontmatter",
  "arguments": {
    "path": "Projects/MyProject.md"
  }
}

update_frontmatter

Update the YAML frontmatter of a note.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the note
updatesobjectYes-Key-value pairs to update
replacebooleanNofalseReplace all frontmatter instead of merging

Returns

json
{
  "success": true,
  "path": "Projects/MyProject.md",
  "frontmatter": {
    "tags": ["project", "active"],
    "status": "completed",
    "completed": "2024-01-15"
  }
}

Example Request

json
{
  "name": "update_frontmatter",
  "arguments": {
    "path": "Projects/MyProject.md",
    "updates": {
      "status": "completed",
      "completed": "2024-01-15"
    }
  }
}

Edge Cases

  • Set a value to null to remove a field
  • Use replace: true to completely replace frontmatter

remove_frontmatter_field

Remove a specific field from the frontmatter.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the note
fieldstringYes-Name of the field to remove

Returns

json
{
  "success": true,
  "path": "Projects/MyProject.md",
  "field": "status",
  "removed": true
}

Example Request

json
{
  "name": "remove_frontmatter_field",
  "arguments": {
    "path": "Projects/MyProject.md",
    "field": "status"
  }
}

add_to_array_field

Add values to an array field in frontmatter.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the note
fieldstringYes-Name of the array field
valuesarrayYes-Values to add
createIfMissingbooleanNotrueCreate the field if it doesn't exist

Returns

json
{
  "success": true,
  "path": "Projects/MyProject.md",
  "field": "tags",
  "added": ["important"],
  "currentValues": ["project", "active", "important"]
}

Example Request

json
{
  "name": "add_to_array_field",
  "arguments": {
    "path": "Projects/MyProject.md",
    "field": "tags",
    "values": ["important", "urgent"]
  }
}

Edge Cases

  • Duplicates are automatically ignored
  • Errors if field exists but is not an array

remove_from_array_field

Remove values from an array field in frontmatter.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the note
fieldstringYes-Name of the array field
valuesarrayYes-Values to remove

Returns

json
{
  "success": true,
  "path": "Projects/MyProject.md",
  "field": "tags",
  "removed": ["old-tag"],
  "currentValues": ["project", "active"]
}

Example Request

json
{
  "name": "remove_from_array_field",
  "arguments": {
    "path": "Projects/MyProject.md",
    "field": "tags",
    "values": ["old-tag"]
  }
}

Tags

Tools for managing tags. Tool group: tags

list_tags

List all unique tags used in the vault with occurrence count.

Parameters

ParameterTypeRequiredDefaultDescription
folderstringNo-Limit tag search to a specific folder

Returns

json
{
  "totalTags": 25,
  "tags": [
    { "tag": "project", "count": 15 },
    { "tag": "idea", "count": 8 },
    { "tag": "todo", "count": 5 }
  ]
}

Example Request

json
{
  "name": "list_tags",
  "arguments": {
    "folder": "Projects"
  }
}

add_tag

Add a tag to a note's frontmatter.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the note
tagstringYes-Tag to add (with or without # prefix)

Returns

json
{
  "success": true,
  "path": "Projects/MyProject.md",
  "addedTag": "important"
}

Example Request

json
{
  "name": "add_tag",
  "arguments": {
    "path": "Projects/MyProject.md",
    "tag": "important"
  }
}

Edge Cases

  • Creates the tags array if it doesn't exist
  • Normalizes tag (removes # prefix if present)

remove_tag

Remove a tag from a note's frontmatter.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the note
tagstringYes-Tag to remove

Returns

json
{
  "success": true,
  "path": "Projects/MyProject.md",
  "removedTag": "old-tag"
}

Example Request

json
{
  "name": "remove_tag",
  "arguments": {
    "path": "Projects/MyProject.md",
    "tag": "old-tag"
  }
}

search_by_tag

Find all notes that have a specific tag.

Parameters

ParameterTypeRequiredDefaultDescription
tagstringYes-Tag to search for
folderstringNo-Limit search to a specific folder

Returns

json
{
  "tag": "project",
  "count": 15,
  "notes": [
    "Projects/MyProject.md",
    "Projects/OtherProject.md",
    "Archive/OldProject.md"
  ]
}

Example Request

json
{
  "name": "search_by_tag",
  "arguments": {
    "tag": "project",
    "folder": "Projects"
  }
}

Edge Cases

  • Searches both frontmatter tags and inline #tags

Tools for analyzing links between notes. Tool group: links

Get all outgoing links from a note.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the note

Returns

json
{
  "path": "Projects/MyProject.md",
  "count": 5,
  "outlinks": [
    { "target": "People/John.md", "alias": "John", "type": "wikilink" },
    { "target": "Concepts/Design.md", "alias": null, "type": "wikilink" },
    { "target": "https://example.com", "alias": "Example", "type": "external" }
  ]
}

Example Request

json
{
  "name": "get_outlinks",
  "arguments": {
    "path": "Projects/MyProject.md"
  }
}

Get all notes that link to a specific note.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the note

Returns

json
{
  "path": "People/John.md",
  "count": 3,
  "backlinks": [
    { "source": "Projects/MyProject.md", "alias": "John", "type": "wikilink" },
    { "source": "Daily/2024-01-15.md", "alias": null, "type": "wikilink" }
  ]
}

Example Request

json
{
  "name": "get_backlinks",
  "arguments": {
    "path": "People/John.md"
  }
}

find_orphans

Find all orphan notes (notes with no incoming or outgoing links).

Parameters

None required.

Returns

json
{
  "count": 8,
  "orphans": [
    "Archive/OldNote.md",
    "Inbox/Untitled.md"
  ]
}

Example Request

json
{
  "name": "find_orphans",
  "arguments": {}
}

Find all broken links (links pointing to non-existent notes).

Parameters

None required.

Returns

json
{
  "count": 3,
  "brokenLinks": [
    {
      "source": "Projects/MyProject.md",
      "target": "People/Unknown.md",
      "type": "wikilink"
    }
  ]
}

Example Request

json
{
  "name": "find_broken_links",
  "arguments": {}
}

Get the complete link graph of the vault as nodes and edges.

Parameters

ParameterTypeRequiredDefaultDescription
maxNodesnumberNo500Maximum number of nodes to include

Returns

json
{
  "nodeCount": 150,
  "edgeCount": 300,
  "nodes": ["Projects/MyProject.md", "People/John.md"],
  "edges": [
    { "source": "Projects/MyProject.md", "target": "People/John.md", "type": "wikilink" }
  ]
}

Example Request

json
{
  "name": "get_link_graph",
  "arguments": {
    "maxNodes": 100
  }
}

Daily Notes

Tools for managing daily notes. Tool group: daily

get_daily_note

Get the daily note for a specific date. Creates it if it doesn't exist.

Parameters

ParameterTypeRequiredDefaultDescription
datestringNotodayDate in YYYY-MM-DD format

Returns

json
{
  "path": "Daily/2024-01-15.md",
  "date": "2024-01-15",
  "created": false,
  "content": "# 2024-01-15\n\n## Tasks\n..."
}

Example Request

json
{
  "name": "get_daily_note",
  "arguments": {
    "date": "2024-01-15"
  }
}

Edge Cases

  • Uses vault's daily notes configuration for folder and format
  • Creates the note if it doesn't exist

create_daily_note

Create a daily note for a specific date if it doesn't exist.

Parameters

ParameterTypeRequiredDefaultDescription
datestringNotodayDate in YYYY-MM-DD format

Returns

json
{
  "success": true,
  "path": "Daily/2024-01-15.md",
  "date": "2024-01-15",
  "created": true,
  "message": "Daily note created"
}

Example Request

json
{
  "name": "create_daily_note",
  "arguments": {
    "date": "2024-01-15"
  }
}

list_daily_notes

List daily notes, optionally filtered by date range.

Parameters

ParameterTypeRequiredDefaultDescription
startDatestringNo-Start date in YYYY-MM-DD format
endDatestringNo-End date in YYYY-MM-DD format
limitnumberNo30Maximum number of notes to return

Returns

json
{
  "count": 15,
  "totalFound": 30,
  "config": {
    "folder": "Daily",
    "format": "YYYY-MM-DD"
  },
  "notes": [
    { "path": "Daily/2024-01-15.md", "date": "2024-01-15" },
    { "path": "Daily/2024-01-14.md", "date": "2024-01-14" }
  ]
}

Example Request

json
{
  "name": "list_daily_notes",
  "arguments": {
    "startDate": "2024-01-01",
    "endDate": "2024-01-31",
    "limit": 10
  }
}

append_to_daily

Append content to today's daily note (or a specific date).

Parameters

ParameterTypeRequiredDefaultDescription
contentstringYes-Content to append
datestringNotodayDate in YYYY-MM-DD format

Returns

json
{
  "success": true,
  "path": "Daily/2024-01-15.md",
  "date": "2024-01-15",
  "appended": "150 characters"
}

Example Request

json
{
  "name": "append_to_daily",
  "arguments": {
    "content": "\n## Meeting Notes\n\n- Discussed project timeline\n- Action items assigned"
  }
}

Edge Cases

  • Creates the daily note if it doesn't exist

Templates

Tools for managing templates. Tool group: templates

list_templates

List all available templates in the vault's templates folder.

Parameters

None required.

Returns

json
{
  "folder": "Templates",
  "count": 5,
  "templates": [
    "Meeting Notes",
    "Project",
    "Daily Note",
    "Book Review"
  ]
}

Example Request

json
{
  "name": "list_templates",
  "arguments": {}
}

get_template

Get the raw content of a template file.

Parameters

ParameterTypeRequiredDefaultDescription
namestringYes-Name of the template (without .md)

Returns

json
{
  "name": "Meeting Notes",
  "content": "# {{title}}\n\nDate: {{date}}\n\n## Attendees\n\n## Agenda\n\n## Notes\n\n## Action Items"
}

Example Request

json
{
  "name": "get_template",
  "arguments": {
    "name": "Meeting Notes"
  }
}

apply_template

Apply a template with variables and return processed content without creating a file.

Parameters

ParameterTypeRequiredDefaultDescription
namestringYes-Name of the template
titlestringNo-Title to replace {{title}}
variablesobjectNo-Custom variables as key-value pairs

Supported Variables

  • {{title}} - Title parameter
  • {{date}} - Current date (YYYY-MM-DD)
  • {{date:FORMAT}} - Date with custom format
  • {{time}} - Current time (HH:mm)
  • {{variable}} - Custom variables

Returns

json
{
  "name": "Meeting Notes",
  "processedContent": "# Q1 Planning\n\nDate: 2024-01-15\n\n## Attendees\n\n## Agenda\n\n## Notes\n\n## Action Items"
}

Example Request

json
{
  "name": "apply_template",
  "arguments": {
    "name": "Meeting Notes",
    "title": "Q1 Planning",
    "variables": {
      "project": "Obsidian MCP"
    }
  }
}

create_from_template

Create a new note from a template with variable substitution.

Parameters

ParameterTypeRequiredDefaultDescription
templatestringYes-Name of the template
pathstringYes-Path for the new note
titlestringNo-Title for the note
variablesobjectNo-Custom variables

Returns

json
{
  "success": true,
  "path": "Meetings/Q1-Planning.md",
  "template": "Meeting Notes"
}

Example Request

json
{
  "name": "create_from_template",
  "arguments": {
    "template": "Meeting Notes",
    "path": "Meetings/Q1-Planning.md",
    "title": "Q1 Planning Meeting"
  }
}

Bases

Tools for querying Obsidian Bases (dynamic note views). Tool group: bases

Note: Obsidian Bases is a feature that creates dynamic views of notes based on filters. The .base file is a YAML configuration that defines which notes to include. The actual data comes from notes in the vault that match the filters defined in the base.

list_bases

List all Obsidian Bases (database files) in the vault.

Parameters

None required.

Returns

json
{
  "count": 2,
  "bases": [
    { "name": "People", "path": "Bases/People.base" },
    { "name": "Projects", "path": "Bases/Projects.base" }
  ]
}

Example Request

json
{
  "name": "list_bases",
  "arguments": {}
}

get_base

Get the full content of an Obsidian Base including configuration, columns, all matching rows, summaries, and views.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the .base file

Returns

json
{
  "name": "People",
  "path": "Bases/People.base",
  "columnCount": 4,
  "rowCount": 2,
  "columns": [
    { "name": "file.name", "type": "text", "displayName": "Name" },
    { "name": "note.tags", "type": "multi-select", "displayName": "Tags" },
    { "name": "note.birthday", "type": "date", "displayName": "Birthday" },
    { "name": "formula.Age", "type": "formula", "displayName": "Age" }
  ],
  "rows": [
    {
      "id": "0",
      "values": {
        "file.name": "John Doe",
        "file.path": "People/John Doe.md",
        "file.folder": "People",
        "file.ext": "md",
        "file.size": 1024,
        "file.ctime": "2024-01-01T00:00:00.000Z",
        "file.mtime": "2024-01-15T10:30:00.000Z",
        "file.links": ["Projects/Work.md"],
        "file.embeds": [],
        "tags": ["people"],
        "birthday": "1990-05-15",
        "formula.Age": 34
      }
    }
  ],
  "summaries": [
    { "column": "formula.Age", "type": "Average", "value": 34 }
  ],
  "views": [
    { "type": "table", "name": "All People", "limit": 100 }
  ]
}

How it works

The .base file contains a YAML configuration like:

yaml
filters:
  and:
    - note.tags.contains("people")
properties:
  file.name:
    displayName: Name
  note.birthday:
    displayName: Birthday
formulas:
  Age: (now() - birthday).years.floor()
summaries:
  formula.Age: Average
views:
  - type: table
    name: "All People"
    limit: 100

The tool:

  1. Parses the YAML configuration
  2. Scans all notes in the vault
  3. Filters notes that match the defined filters
  4. Extracts frontmatter properties from matching notes
  5. Evaluates any formulas using the full expression parser
  6. Calculates summaries (aggregations)
  7. Returns the data as columns, rows, summaries, and views

Example Request

json
{
  "name": "get_base",
  "arguments": {
    "path": "Bases/People.base"
  }
}

query_base

Query an Obsidian Base with additional filtering, sorting, and limiting on top of the base's built-in filters.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the .base file
filterobjectNo-Additional filter conditions as key-value pairs
sortColumnstringNo-Column to sort by (e.g., "file.name", "birthday")
sortOrderstringNo"asc"Sort order: "asc" or "desc"
limitnumberNo-Maximum rows to return

Returns

json
{
  "path": "Bases/People.base",
  "resultCount": 1,
  "rows": [
    {
      "id": "0",
      "values": {
        "file.name": "John Doe",
        "file.path": "People/John Doe.md",
        "tags": ["people"],
        "birthday": "1990-05-15",
        "formula.Age": 34
      }
    }
  ]
}

Example Request

json
{
  "name": "query_base",
  "arguments": {
    "path": "Bases/People.base",
    "filter": { "file.name": "John Doe" },
    "sortColumn": "birthday",
    "sortOrder": "desc",
    "limit": 10
  }
}

Expression Parser

The Bases tools include a powerful expression parser that supports complex filters and formulas.

Operators

OperatorDescriptionExample
==, =Equalitystatus == "active"
!=Inequalitystatus != "done"
>, >=, <, <=Comparisonpriority > 5
&&, andLogical ANDstatus == "active" && priority > 3
||, orLogical ORstatus == "done" || status == "cancelled"
!, notLogical NOT!file.name.contains("Template")
+, -, *, /, %Arithmeticprice * quantity

Filter Patterns

FilterDescriptionExample
note.tags.contains("tag")Notes with a specific tagnote.tags.contains("people")
file.name.contains("text")Notes with text in filenamefile.name.contains("Template")
file.folder.contains("path")Notes in a specific folderfile.folder.contains("Projects")
property == valueProperty equals valuestatus == "active"
property > valueNumeric/date comparisonpriority > 3
file.hasTag("tag")Check if file has tagfile.hasTag("project")
file.inFolder("path")Check if in folderfile.inFolder("Projects")
file.hasProperty("name")Check if has propertyfile.hasProperty("status")
file.hasLink("path")Check if links to filefile.hasLink("Index.md")
file.mtime > now() - "7d"Date comparisonModified in last 7 days
/pattern/.matches(value)Regex matching/^Project/.matches(file.name)

Filters are combined with and (all must match) or or (any can match).

File Properties

PropertyTypeDescription
file.namestringFile name without extension
file.pathstringRelative path from vault root
file.folderstringParent folder path
file.extstringFile extension (without dot)
file.basenamestringFile name without path or extension
file.sizenumberFile size in bytes
file.ctimeDateCreation time
file.mtimeDateLast modification time
file.tagsListTags from frontmatter and content
file.linksListOutgoing wiki links
file.embedsListEmbedded content references

Global Functions

FunctionDescriptionExample
now()Current date/timenow()
today()Today at midnighttoday()
date("string")Parse date stringdate("2024-01-15")
if(cond, true, false)Conditionalif(status == "done", "✓", "")
min(...values)Minimum valuemin(1, 2, 3)
max(...values)Maximum valuemax(1, 2, 3)
number(value)Convert to numbernumber("42")
list(...values)Create listlist(1, 2, 3)
link(path, display?)Create linklink("note.md", "My Note")
duration("string")Parse durationduration("7d")
file(path)Create File objectfile("folder/note.md")
image(path)Create Image objectimage("img.png")
icon(name)Create Icon (Lucide)icon("star")
html(content)Create HTML objecthtml("<b>bold</b>")
escapeHTML(str)Escape HTML charsescapeHTML("<script>")

Date Arithmetic

OperationDescriptionExample
date + "duration"Add durationtoday() + "7d"
date - "duration"Subtract durationnow() - "1M"
date1 - date2Difference (ms)now() - file.ctime
(diff).yearsConvert to years(now() - birthday).years
(diff).daysConvert to days(now() - file.mtime).days

Duration units: y/years, M/months, w/weeks, d/days, h/hours, m/minutes, s/seconds

String Functions

FunctionDescriptionExample
str.contains("value")Contains substringname.contains("John")
str.startsWith("prefix")Starts withname.startsWith("Dr.")
str.endsWith("suffix")Ends withfile.name.endsWith("_draft")
str.lower()Lowercasename.lower()
str.upper()Uppercasename.upper()
str.trim()Remove whitespacename.trim()
str.replace("a", "b")Replace textstatus.replace("_", " ")
str.split(",")Split to listtags.split(",")
str.lengthString lengthname.length

Number Functions

FunctionDescriptionExample
num.abs()Absolute value(-5).abs()
num.ceil()Round up(4.2).ceil()
num.floor()Round down(4.8).floor()
num.round(digits?)Round(4.567).round(2)
num.toFixed(digits)Format decimal(4.5).toFixed(2)

List Functions

FunctionDescriptionExample
list.contains(value)Contains elementtags.contains("important")
list.join(",")Join to stringtags.join(", ")
list.sort()Sort listtags.sort()
list.reverse()Reverse listitems.reverse()
list.unique()Remove duplicatestags.unique()
list.first()First elementtags.first()
list.last()Last elementtags.last()
list.lengthList lengthtags.length
FunctionDescriptionExample
link.asFile()Convert to File objectmyLink.asFile()
link.linksTo(file)Check if links to filemyLink.linksTo("note.md")

Object Functions

FunctionDescriptionExample
obj.isEmpty()Check if emptymetadata.isEmpty()
obj.keys()Get list of keysmetadata.keys()
obj.values()Get list of valuesmetadata.values()
obj.hasKey(key)Check if has keymetadata.hasKey("status")

Type Checking

FunctionDescriptionExample
value.toString()Convert to string(42).toString()
value.isTruthy()Check if truthystatus.isTruthy()
value.isType("type")Check typevalue.isType("string")

Type names: string, number, boolean, date, list, array, object, null, undefined, link, regex, file, image, icon, html


Summaries (Aggregations)

Bases can include summaries to aggregate column values:

yaml
summaries:
  price: Average
  quantity: Sum
  due_date: Earliest

Built-in Summary Types

SummaryInput TypeDescription
AverageNumberMean of all values
MinNumberSmallest value
MaxNumberLargest value
SumNumberTotal of all values
RangeNumberMax - Min
MedianNumberMiddle value
StddevNumberStandard deviation
EarliestDateOldest date
LatestDateMost recent date
CheckedBooleanCount of true values
UncheckedBooleanCount of false values
CountAnyTotal number of values
EmptyAnyCount of empty values
FilledAnyCount of non-empty values
UniqueAnyCount of unique values

Views Configuration

Bases can define multiple views with different filters, sorting, and display options:

yaml
views:
  - type: table
    name: "Active Tasks"
    limit: 10
    filters:
      and:
        - 'status != "done"'
    sort:
      - property: priority
        direction: DESC
      - property: due_date
        direction: ASC
    groupBy:
      property: status
      direction: ASC
    summaries:
      priority: Average

View Properties

PropertyTypeDescription
typestringView type: table, cards, list, map
namestringDisplay name for the view
limitnumberMaximum rows to show
filtersobjectAdditional filters (same syntax as base filters)
orderstring[]Column display order
sortarraySort configuration
groupByobjectGroup rows by property
summariesobjectView-specific summaries

Formula Examples

yaml
formulas:
  # Calculate age from birthday
  Age: (now() - birthday).years.floor()

  # Days since last modified
  DaysSinceModified: (now() - file.mtime).days.floor()

  # Concatenate strings
  FullName: firstName + " " + lastName

  # Check if overdue
  IsOverdue: due_date < today()

  # Conditional formatting
  Priority: if(urgent, "🔴 High", "🟢 Normal")

  # Count tags
  TagCount: tags.length

  # Check with regex
  IsTemplate: /^Template/.matches(file.name)

Batch Operations

Tools for batch operations on multiple notes. Tool group: batch

batch_move

Move multiple notes to a destination folder at once.

Parameters

ParameterTypeRequiredDefaultDescription
pathsstring[]Yes-Array of note paths to move
destinationFolderstringYes-Destination folder path
updateLinksbooleanNotrueUpdate wikilinks in other notes

Returns

json
{
  "success": true,
  "total": 5,
  "succeeded": 5,
  "failed": 0,
  "results": [
    { "path": "Inbox/Note1.md", "success": true, "details": { "newPath": "Archive/Note1.md" } },
    { "path": "Inbox/Note2.md", "success": true, "details": { "newPath": "Archive/Note2.md" } }
  ]
}

Example Request

json
{
  "name": "batch_move",
  "arguments": {
    "paths": ["Inbox/Note1.md", "Inbox/Note2.md"],
    "destinationFolder": "Archive"
  }
}

batch_delete

Delete multiple notes at once. Requires confirmation.

Parameters

ParameterTypeRequiredDefaultDescription
pathsstring[]Yes-Array of note paths to delete
confirmbooleanYes-Must be true to confirm deletion

Returns

json
{
  "success": true,
  "total": 3,
  "succeeded": 3,
  "failed": 0,
  "results": [
    { "path": "Trash/Note1.md", "success": true },
    { "path": "Trash/Note2.md", "success": true }
  ]
}

Example Request

json
{
  "name": "batch_delete",
  "arguments": {
    "paths": ["Trash/Note1.md", "Trash/Note2.md"],
    "confirm": true
  }
}

Edge Cases

  • Fails if confirm is not true
  • Individual failures don't stop other deletions

batch_update_frontmatter

Update frontmatter of multiple notes at once.

Parameters

ParameterTypeRequiredDefaultDescription
pathsstring[]Yes-Array of note paths
updatesobjectYes-Key-value pairs to update
replacebooleanNofalseReplace all frontmatter

Returns

json
{
  "success": true,
  "total": 5,
  "succeeded": 5,
  "failed": 0,
  "results": [
    { "path": "Projects/A.md", "success": true, "details": { "frontmatter": {...} } }
  ]
}

Example Request

json
{
  "name": "batch_update_frontmatter",
  "arguments": {
    "paths": ["Projects/A.md", "Projects/B.md"],
    "updates": { "status": "archived", "archived_date": "2024-01-15" }
  }
}

batch_add_tag

Add tags to multiple notes at once.

Parameters

ParameterTypeRequiredDefaultDescription
pathsstring[]Yes-Array of note paths
tagsstring[]Yes-Tags to add (without # prefix)

Returns

json
{
  "success": true,
  "total": 5,
  "succeeded": 5,
  "failed": 0,
  "results": [
    { "path": "A.md", "success": true, "details": { "addedTags": ["archived"], "currentTags": [...] } }
  ]
}

Example Request

json
{
  "name": "batch_add_tag",
  "arguments": {
    "paths": ["Projects/A.md", "Projects/B.md"],
    "tags": ["archived", "2024"]
  }
}

batch_remove_tag

Remove tags from multiple notes at once.

Parameters

ParameterTypeRequiredDefaultDescription
pathsstring[]Yes-Array of note paths
tagsstring[]Yes-Tags to remove (without # prefix)

Returns

json
{
  "success": true,
  "total": 5,
  "succeeded": 5,
  "failed": 0,
  "results": [
    { "path": "A.md", "success": true, "details": { "removedTags": ["active"], "currentTags": [...] } }
  ]
}

Example Request

json
{
  "name": "batch_remove_tag",
  "arguments": {
    "paths": ["Projects/A.md", "Projects/B.md"],
    "tags": ["active"]
  }
}

batch_read_notes

Read multiple notes at once (max 10).

Parameters

ParameterTypeRequiredDefaultDescription
pathsstring[]Yes-Array of note paths (max 10)
includeContentbooleanNotrueInclude note content
includeFrontmatterbooleanNotrueInclude parsed frontmatter

Returns

json
{
  "success": true,
  "total": 3,
  "succeeded": 3,
  "failed": 0,
  "results": [
    {
      "path": "Projects/A.md",
      "success": true,
      "content": "# Project A\n...",
      "frontmatter": { "tags": ["project"] }
    }
  ]
}

Example Request

json
{
  "name": "batch_read_notes",
  "arguments": {
    "paths": ["Projects/A.md", "Projects/B.md", "Projects/C.md"],
    "includeContent": true,
    "includeFrontmatter": true
  }
}

Attachments

Tools for managing attachments. Tool group: attachments

list_attachments

List all non-markdown files (images, PDFs, etc.) in the vault.

Parameters

ParameterTypeRequiredDefaultDescription
folderstringNo-Folder to search
typestringNo"all"Filter by type: "image", "document", "audio", "video", "other", "all"

Supported File Types

  • image: png, jpg, jpeg, gif, bmp, svg, webp, ico, tiff
  • document: pdf, doc, docx, xls, xlsx, ppt, pptx, odt, ods, odp
  • audio: mp3, wav, ogg, flac, m4a, aac, wma
  • video: mp4, mkv, avi, mov, webm, wmv, flv
  • other: zip, rar, 7z, tar, gz, csv, json, xml

Returns

json
{
  "attachments": [
    {
      "path": "Attachments/image.png",
      "name": "image.png",
      "extension": ".png",
      "size": 102400,
      "modified": "2024-01-15T10:30:00.000Z",
      "type": "image"
    }
  ],
  "count": 25,
  "totalSize": 15728640
}

Example Request

json
{
  "name": "list_attachments",
  "arguments": {
    "type": "image"
  }
}

get_attachment_info

Get detailed information about an attachment.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the attachment file

Returns

json
{
  "path": "Attachments/diagram.png",
  "name": "diagram.png",
  "extension": ".png",
  "type": "image",
  "size": 102400,
  "created": "2024-01-01T08:00:00.000Z",
  "modified": "2024-01-15T10:30:00.000Z",
  "embedSyntax": "![[diagram.png]]",
  "linkSyntax": "[[diagram.png]]"
}

Example Request

json
{
  "name": "get_attachment_info",
  "arguments": {
    "path": "Attachments/diagram.png"
  }
}

find_unused_attachments

Find attachments that are not referenced by any note.

Parameters

ParameterTypeRequiredDefaultDescription
folderstringNo-Folder to search for attachments

Returns

json
{
  "unused": [
    {
      "path": "Attachments/old-image.png",
      "name": "old-image.png",
      "extension": ".png",
      "size": 51200,
      "type": "image"
    }
  ],
  "count": 5,
  "totalSize": 256000,
  "totalAttachments": 50
}

Example Request

json
{
  "name": "find_unused_attachments",
  "arguments": {}
}

Edge Cases

  • References are searched vault-wide even if folder is specified
  • Checks both wikilink and markdown link formats

get_attachments_in_note

Get all attachment references in a specific note.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the note

Returns

json
{
  "note": "Projects/MyProject.md",
  "attachments": [
    {
      "reference": "![[diagram.png]]",
      "name": "diagram.png",
      "type": "embed",
      "format": "wikilink"
    },
    {
      "reference": "[PDF](docs/spec.pdf)",
      "name": "spec.pdf",
      "type": "link",
      "format": "markdown"
    }
  ],
  "count": 2
}

Example Request

json
{
  "name": "get_attachments_in_note",
  "arguments": {
    "path": "Projects/MyProject.md"
  }
}

Backup

Tools for backup and restore. Tool group: backup

create_note_backup

Create a backup copy of a note with timestamp.

Parameters

ParameterTypeRequiredDefaultDescription
pathstringYes-Path to the note to backup
backupFolderstringNo".backups"Folder to store backups

Returns

json
{
  "success": true,
  "originalNote": "Projects/MyProject.md",
  "backupPath": ".backups/Projects_MyProject_2024-01-15T10-30-00-000Z.md",
  "timestamp": "2024-01-15T10:30:00.000Z"
}

Example Request

json
{
  "name": "create_note_backup",
  "arguments": {
    "path": "Projects/MyProject.md"
  }
}

list_backups

List available backups, optionally filtered by note.

Parameters

ParameterTypeRequiredDefaultDescription
notePathstringNo-Filter backups for a specific note
backupFolderstringNo".backups"Folder where backups are stored

Returns

json
{
  "backups": [
    {
      "path": ".backups/Projects_MyProject_2024-01-15T10-30-00-000Z.md",
      "originalNote": "Projects/MyProject.md",
      "timestamp": "2024-01-15T10:30:00.000Z",
      "size": 2048
    }
  ],
  "count": 5
}

Example Request

json
{
  "name": "list_backups",
  "arguments": {
    "notePath": "Projects/MyProject.md"
  }
}

restore_backup

Restore a note from a backup.

Parameters

ParameterTypeRequiredDefaultDescription
backupPathstringYes-Path to the backup file
targetPathstringNo-Target path (defaults to original)
createBackupFirstbooleanNotrueBackup current content before restoring

Returns

json
{
  "success": true,
  "restoredTo": "Projects/MyProject.md",
  "fromBackup": ".backups/Projects_MyProject_2024-01-15T10-30-00-000Z.md",
  "previousBackupCreated": ".backups/Projects_MyProject_2024-01-16T08-00-00-000Z.md"
}

Example Request

json
{
  "name": "restore_backup",
  "arguments": {
    "backupPath": ".backups/Projects_MyProject_2024-01-15T10-30-00-000Z.md",
    "createBackupFirst": true
  }
}

Edge Cases

  • Creates backup of current note before overwriting (unless disabled)
  • Backup metadata is stripped from restored content

delete_old_backups

Delete old backups, keeping only the most recent ones per note.

Parameters

ParameterTypeRequiredDefaultDescription
keepLastnumberNo5Number of recent backups to keep per note
backupFolderstringNo".backups"Folder where backups are stored
dryRunbooleanNofalseOnly report what would be deleted

Returns

json
{
  "success": true,
  "deleted": [".backups/old_backup_1.md", ".backups/old_backup_2.md"],
  "count": 2,
  "dryRun": false
}

Example Request (Dry Run)

json
{
  "name": "delete_old_backups",
  "arguments": {
    "keepLast": 3,
    "dryRun": true
  }
}

Returns (Dry Run)

json
{
  "success": true,
  "deleted": [],
  "wouldDelete": [".backups/old_backup_1.md", ".backups/old_backup_2.md"],
  "count": 2,
  "dryRun": true
}

Released under the MIT License.