Skip to main content
Glama

patch_frontmatter_tool

Update YAML frontmatter keys in Obsidian notes without altering the note body. Apply updates to one or multiple notes, preview changes with dry run, and merge or replace list values.

Instructions

Update specific YAML frontmatter keys without touching the note body.

Pass path for one note, or paths to apply the same updates to several notes in one call — exactly one of the two.

merge_arrays=True merges list values (e.g. tags); False replaces them. dry_run=True previews data {preview, diff, updated_keys} without writing — check it, then call again with dry_run=False.

With path: data carries {updated_keys, diff} and the envelope a revision. With paths: one note failing doesn't abort the rest — this returns the batch envelope, with data.results holding one item per note ({success, path, revision} or {success: false, path, error}) and data.summary the {total, succeeded, failed} tally. Always check data.summary.failed. expected_revision pins a single note's bytes and so can't be combined with paths.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
pathsNo
vaultNo
dry_runNo
updatesNo
merge_arraysNo
expected_revisionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description fully carries the behavioral burden. It discloses dry-run behavior, merge semantics, batch failure isolation, return payloads for both single and batch modes, and an important incompatibility between expected_revision and paths. This is exceptionally transparent for a mutation tool.

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?

The description is detailed but every sentence earns its place. It front-loads the core purpose, then logically organizes parameter behavior, return formats, and constraints. The length is justified given the tool's complexity and the absence of annotations.

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?

The description covers single-note and batch behavior, dry-run output, merge_array semantics, revision handling, and failure summary expectations. Given the complexity of the tool and an output schema that can define return fields, this is fully complete for an agent to select and invoke it correctly.

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 description coverage is 0%, yet the description compensates well by explaining path, paths, updates, dry_run, merge_arrays, and expected_revision. The only unaddressed parameter is vault, which relies on the schema's type information and likely the tool's contextual naming; this is a small but notable gap.

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 opens with a specific verb and resource: 'Update specific YAML frontmatter keys without touching the note body.' This clearly distinguishes it from sibling tools like patch_note_text_tool and write_note_tool, so an agent can immediately identify its scope.

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?

The description clearly explains when to use the tool for frontmatter-only updates and provides rich context for path vs paths, dry_run, merge_arrays, and expected_revision. It doesn't explicitly name alternatives or state when not to use it, but the 'without touching the note body' phrase gives clear contextual guidance.

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