Skip to main content
Glama

Update Frontmatter

update_frontmatter
DestructiveIdempotent

Merge new key-value pairs into a note's YAML frontmatter, preserving existing keys and leaving the body untouched. Use to set status, tags, or other metadata.

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?

Beyond the annotations (destructive, idempotent), the description details that the YAML block is regenerated, normalizing comments, quoting, multi-line scalars, blank lines, and key ordering. It also notes that it creates a frontmatter block if none exists. This fully discloses side effects.

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 paragraphs: first states purpose and return value, second warns about formatting normalization. Front-loaded with key information, no wasted words.

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?

Given no output schema, the description includes the return value (count of properties written). It covers all necessary aspects: merge semantics, behavior on missing frontmatter, and formatting caveats. Sibling context is naturally handled, and the definition is self-contained.

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% with descriptions for both parameters. The description adds value by explaining the merge behavior: 'Keys in the payload overwrite existing values' and 'Existing keys not in the payload are preserved,' which is not fully captured in the schema.

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 clearly states it merges key-value pairs into YAML frontmatter, preserving existing keys and body content. It distinguishes itself from siblings like replace_in_note or update_section by focusing solely on frontmatter metadata.

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?

It explicitly says 'Use to set status fields, tags arrays, or other metadata without rewriting the body.' This provides clear guidance on when to use the tool, though it does not explicitly mention alternatives for body changes.

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