Skip to main content
Glama
obsidian-pkm

obsidian-pkm

by AdrianV101

vault_write

Create a new Obsidian note from a template, set required frontmatter and tags, and pass custom variables; use a .md path outside dot-folders without overwriting existing notes.

Instructions

Create a new note from a template. Notes must be created from templates to ensure proper frontmatter. The path must be a .md file outside dot-folders (not .obsidian/, .git/ or .trash/), and an existing note is never overwritten.

Available templates:

  • adr: ADR-XXX: {title}

  • daily-note: {title}

  • devlog-session: Template for devlog-session

  • devlog: Development Log

  • fleeting-note: {title}

  • literature-note: {title}

  • meeting-notes: Meeting: {title}

  • moc: {title}

  • note: {title}

  • permanent-note: {title}

  • project-index: {title}

  • research-note: {title}

  • task: {title}

  • troubleshooting-log: {title}

Built-in variables (auto-substituted):

  • <% tp.date.now("YYYY-MM-DD") %> - Current date

  • <% tp.file.title %> - Derived from output path filename

Required: frontmatter.tags - provide at least one tag for the note. Optional: frontmatter.session, frontmatter.status, frontmatter.priority, frontmatter.project, frontmatter.deciders, frontmatter.due, frontmatter.source (depending on template type). Pass custom <%...%> variables via the 'variables' parameter. Paths in this tool's output are formatted as markdown links [vault-relative-path.md](obsidian://...) so users can Cmd/Ctrl-click to open in Obsidian. Preserve the link form when relaying paths to the user; pass only the bracket text (e.g. 01-Projects/Foo/note.md) to other vault tools' path arguments, never the full markdown link.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "template": "<template>",
      "path": "<path>"
    },
    "name": "vault_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesOutput path relative to vault root
templateYesTemplate name (filename without .md from 05-Templates/)
variablesNoCustom variables for <%...%> patterns in body (key-value string pairs)
createDirsNoCreate parent directories if they don't exist
frontmatterNoFrontmatter fields to set (e.g., {tags: ['tag1', 'tag2'], status: 'active'})

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv4.0.2
    • addedInput schema / properties / frontmatter / properties / session
      Added value: +{
      +  "description": "Session identifier the note belongs to",
      +  "type": "string"
      +}
    • changedInput schema / properties / template / enum
      Previous value: -[]New value: +[
      +  "adr",
      +  "daily-note",
      +  "devlog-session",
      +  "devlog",
      +  "fleeting-note",
      +  "literature-note",
      +  "meeting-notes",
      +  "moc",
      +  "note",
      +  "permanent-note",
      +  "project-index",
      +  "research-note",
      +  "task",
      +  "troubleshooting-log"
      +]
  2. First observedv3.10.1

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does most of it: destructive scope is bounded (never overwrites), path guards are enumerated (.obsidian/, .git/, .trash/ excluded), template and frontmatter requirements are stated, and the output link format is disclosed. It stops short of saying what happens on a path collision (error vs. silent no-op) or any permission requirements.

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

Conciseness4/5

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

Purpose and hard constraints are front-loaded before the template catalog and variable reference, which is the right order for an agent scanning for eligibility. The template list partially duplicates the enum already in the schema, but the per-template title patterns add enough to justify most of the length.

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

Completeness4/5

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

For a 5-parameter tool with a nested frontmatter object and no output schema, the description covers creation rules, template selection, variable substitution, and the exact shape of the returned path link, including how to pass that path to other vault tools. The only material gap is failure behavior when the target path already exists.

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%, so the baseline would be 3, but the description adds real meaning beyond the schema: it lists each template with the title pattern it produces, states that frontmatter.tags is required, and notes which optional fields apply to which template types (status/priority for tasks, deciders for ADRs, project for devlogs). It also clarifies that variables are key-value string pairs for <%...%> substitution.

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?

States a specific verb and resource ('Create a new note from a template') and immediately distinguishes itself from editing siblings with 'an existing note is never overwritten.' An agent knows this is the creation-only entry point without opening the schema.

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?

Gives clear preconditions (must use a template, path must be a .md file outside dot-folders) and an implicit boundary against mutation tools via the no-overwrite rule. It does not explicitly name vault_edit or vault_append as the alternative for changing existing notes, so routing is inferred rather than stated.

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