Edit Frontmatter
notes.frontmatterSet or unset YAML frontmatter fields in a note. Choose merge to update specific fields or replace to overwrite the entire block.
Instructions
Set or unset fields in a note's YAML frontmatter. set is a map of {field: value} pairs to write; unset is a list of field names to delete. strategy:'merge' (default) leaves unspecified fields untouched; strategy:'replace' overwrites the entire frontmatter block with set (any field not in set is dropped). At least one of set or unset is required. Idempotent — re-running with the same arguments converges on the same frontmatter state.
Operates on the session-active vault (see vault.current — selectable via vault.select) unless an explicit vaultPath argument is passed, which always wins.
Examples:
Example 1 — Set two fields, merging with existing frontmatter:
{
"path": "Projects/Alpha.md",
"set": {
"status": "in-progress",
"owner": "behzat"
}
}Example 2 — Remove a field:
{
"path": "Projects/Alpha.md",
"unset": [
"draft"
]
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| set | No | Map of frontmatter fields to set. Values overwrite any existing entry. | |
| unset | No | Field names to delete from the frontmatter. | |
| strategy | No | `merge` (default) = combine with existing frontmatter; `replace` = overwrite the whole frontmatter block with `set` (ignores existing unspecified fields). | merge |
| vaultPath | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changed | Yes | True if the tool altered vault state on this call; false if it was a no-op. | |
| target | Yes | The path or identifier the tool acted on. | |
| summary | Yes | Short human-readable summary of what happened. |