Skip to content

[BUG] "execute template" fails without a tags field in YAML #41

@slopez31

Description

@slopez31

Bug Description

Hi,
and thanks for this mcp server - it's one of the best for my workflow.

I couldn't understand why i couldn't use the 'execute_template' fonction.
I first tought, it was due to complex templater notes, but after multiple tests, i have isolate the issue (the logs make it clearer in hindsight).

The function only works if the Templater template’s YAML includes an explicit tags field as an empty array:

tags : [ ]

Without that field, I consistently get an error.

Environment

  • OS: Windows 11
  • Obsidian version: 1.9.12
  • Claude Desktop version: Claude 0.13.37
  • Plugin version: 0.2.27
  • Required plugins status:
    • Local REST API installed and configured
    • Smart Connections installed (if using semantic search)
    • Templater installed (if using templates)

Steps to Reproduce

  1. Create a Templater template without an explicit tags field in the frontmatter:

no tags field


  1. Ask Claude (via the MCP server) to create a note based on this template using execute_template.

Expected Behavior

A standard Templater template (valid in Obsidian) should be instantiated by the MCP server without requiring a tags field.

What should happen

Actual Behavior

If the template’s frontmatter lacks tags: [], the server returns an error indicating frontmatter.tags must be an array (was null).

---
tags: []
--- 

Workaround

As a workaround, add an explicit empty tags array to the template's frontmatter :

Error Messages/Logs

2025-09-30T07:04:59.797Z [ERROR] "Error handling execute_template"
{
  "code": -32603,
  "message": "MCP error -32603: GET /vault/zzz-config/templater/archive/Template-note-asset-1.md 200: frontmatter.tags must be an array (was null)",
  "stack": "Error: MCP error -32603: GET /vault/zzz-config/templater/archive/Template-note-asset-1.md 200: frontmatter.tags must be an array (was null)\n    at new s1 (../../node_modules/@modelcontextprotocol/sdk/dist/types.js:992:9)\n    at N1 (src/shared/makeRequest.ts:68:15)\n    at processTicksAndRejections (native:7:39)",
  "error": {
    "code": -32603
  },
  "params": {
    "name": "execute_template",
    "arguments": {
      "arguments": {},
      "createFile": "true",
      "name": "zzz-config/templater/archive/Template-note-asset-1.md",
      "targetPath": "ZZZ-Test/Test-Template-Asset-1-Tags-Sans-Crochets.md"
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions