Skip to main content
Glama

Update Frontmatter

update_frontmatter
DestructiveIdempotent

Update YAML frontmatter properties in an Obsidian note. Merge new key-value pairs, overwrite existing values, and preserve unmentioned keys. Creates frontmatter if none exists. Returns count of properties written.

Instructions

Merge new key-value pairs into a note's YAML frontmatter, preserving any keys not mentioned and leaving the body content untouched. Keys in the payload overwrite existing values. Creates a frontmatter block if the note has none. Returns a count of properties written. Use to set status fields, tags arrays, or other metadata without rewriting the body.

Note: The YAML block is regenerated on each update — comments, custom quoting, multi-line scalar style, blank lines, and key ordering inside the block are normalized. Key presence and values are preserved; formatting is not.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRelative path from vault root to the note (e.g., 'projects/alpha.md'). Extension optional.
propertiesYesJSON object string of frontmatter keys to set, e.g., '{"status":"done","priority":1,"tags":["review"]}'. Existing keys not in the payload are preserved.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate destructive but idempotent. Description adds critical behavioral detail: YAML block regeneration normalizes formatting (comments, quoting, line style, ordering). This goes beyond annotations and is essential for correct usage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise paragraphs with zero waste. Front-loads the core action and use case, then adds a necessary warning about formatting normalization. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Even without an output schema, description states return value ('count of properties written'). Covers edge cases (creates frontmatter if absent). Given annotations and sibling context, no gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, baseline 3. Description adds value by explaining path format ('Relative path from vault root') and properties as JSON string with example, plus behavior details like overwriting only specified keys.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verbs ('Merge new key-value pairs into a note's YAML frontmatter') and clearly distinguishes from siblings that modify body content (e.g., append_to_note, prepend_to_note). It precisely defines the resource and action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use: 'Use to set status fields, tags arrays, or other metadata without rewriting the body.' Implies not for body edits. Lacks explicit mention of alternatives among siblings but provides clear context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rps321321/obsidian-mcp-pro'

If you have feedback or need assistance with the MCP directory API, please join our Discord server