Skip to content

CLI and MCP ignore primaryNotesLocation: root when creating notes #745

Description

@diazkev314

Summary

With the vault set to "Vault root" mode, zn create and the MCP create_note tool still write new notes to inbox/. vault_info also reports primaryNotesLocation: inbox. Reading and searching root-level notes works fine, so only creation and mode detection are affected.

Environment

  • ZenNotes 2.45.0 (zn v2.45.0), macOS 26.6.2
  • Local vault, .zennotes/vault.json contains "primaryNotesLocation": "root"

Steps to reproduce

  1. Settings → Vault → Notes → Primary notes location → "Vault root".
  2. Confirm .zennotes/vault.json has "primaryNotesLocation": "root".
  3. Run zn create --title Test --body test --json.

Expected

path is Test.md at the vault root, and vault_info (MCP) reports primaryNotesLocation: root.

Actual

path is inbox/Test.md, and vault_info reports primaryNotesLocation: inbox.

Notes

  • Reproduces after restarting the app, the MCP process, and a full reboot.
  • zn list and zn search do return a note placed manually at the vault root, so reads honor the layout.
  • The tool descriptions in server-*.js document root-mode behavior, but I couldn't find any code path in the CLI bundle that reads primaryNotesLocation from vault.json.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions