neuro-vault-mcp 3.2.1 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -15368,10 +15368,18 @@ function normalizePath(raw) {
15368
15368
  var VALID_FIELDS = ["frontmatter", "content"];
15369
15369
  var DEFAULT_FIELDS = ["frontmatter", "content"];
15370
15370
  function validateReadNotesInput(input) {
15371
- if (!Array.isArray(input.paths)) {
15372
- throw invalidArgument("paths must be an array", "paths");
15371
+ let paths;
15372
+ if (typeof input.paths === "string") {
15373
+ if (input.paths === "") {
15374
+ throw invalidArgument("paths must not be empty", "paths");
15375
+ }
15376
+ paths = [input.paths];
15377
+ } else if (Array.isArray(input.paths)) {
15378
+ paths = input.paths;
15379
+ } else {
15380
+ throw invalidArgument("paths must be a string or an array of strings", "paths");
15373
15381
  }
15374
- if (input.paths.length < 1 || input.paths.length > 50) {
15382
+ if (paths.length < 1 || paths.length > 50) {
15375
15383
  throw invalidArgument("paths must contain between 1 and 50 entries", "paths");
15376
15384
  }
15377
15385
  let fields;
@@ -15391,7 +15399,7 @@ function validateReadNotesInput(input) {
15391
15399
  }
15392
15400
  fields = input.fields;
15393
15401
  }
15394
- return { paths: input.paths, fields };
15402
+ return { paths, fields };
15395
15403
  }
15396
15404
 
15397
15405
  // src/modules/operations/tools/append-daily.ts
@@ -15901,7 +15909,7 @@ function buildReadDailyTool(deps) {
15901
15909
  // src/modules/operations/tools/read-notes.ts
15902
15910
  var readNotesFieldSchema = external_exports.enum(["frontmatter", "content"]);
15903
15911
  var inputSchema12 = external_exports.object({
15904
- paths: external_exports.array(external_exports.string()).min(1).max(50),
15912
+ paths: external_exports.union([external_exports.string().min(1), external_exports.array(external_exports.string()).min(1).max(50)]),
15905
15913
  fields: external_exports.array(readNotesFieldSchema).min(1).optional()
15906
15914
  });
15907
15915
  function buildReadNotesTool(deps) {
@@ -15909,7 +15917,7 @@ function buildReadNotesTool(deps) {
15909
15917
  return {
15910
15918
  name: "read_notes",
15911
15919
  title: "Read Notes",
15912
- description: "Read multiple notes in one call. `paths` is an array of 1\u201350 vault-relative POSIX paths; duplicates are de-duplicated and results returned in input order. `fields` projects which parts of each note to return \u2014 choose from `frontmatter` and `content`; default `['frontmatter','content']`. One missing or unreadable path does not fail the others \u2014 per-item errors come back inline. A single MCP roundtrip with parallel disk reads. Reads are direct from disk and do not require Obsidian to be running.",
15920
+ description: "Read one or more notes in one call. `paths` is a vault-relative POSIX path string or an array of 1\u201350 such paths; duplicates are de-duplicated and results returned in input order. `fields` projects which parts of each note to return \u2014 choose from `frontmatter` and `content`; default `['frontmatter','content']`. One missing or unreadable path does not fail the others \u2014 per-item errors come back inline. A single MCP roundtrip with parallel disk reads. Reads are direct from disk and do not require Obsidian to be running.",
15913
15921
  inputSchema: inputSchema12,
15914
15922
  handler: async (input) => {
15915
15923
  const { paths, fields } = validateReadNotesInput(input);
@@ -16084,7 +16092,7 @@ When operating directly inside the vault itself (not from an external project th
16084
16092
  ### Notes (body)
16085
16093
 
16086
16094
  Use \`read_notes\`, \`create_note\`, \`edit_note\`, \`read_daily\`, \`append_daily\` when the user asks to:
16087
- - Read one or more notes by path (\`read_notes\` \u2014 accepts an array of 1\u201350 vault-relative POSIX paths; prefer this over multiple sequential reads)
16095
+ - Read one or more notes by path (\`read_notes\` \u2014 accepts a single vault-relative POSIX path string or an array of 1\u201350 such paths; prefer this over multiple sequential reads)
16088
16096
  - Create a new note, task, or idea (\`create_note\`)
16089
16097
  - Add content to an existing note (\`edit_note\`)
16090
16098
  - Read or update today's daily note (\`read_daily\` / \`append_daily\`)
@@ -16136,7 +16144,7 @@ Use \`search_notes\` when the user is recalling a topic fuzzily, asking a concep
16136
16144
 
16137
16145
  ## Routing between operations and semantic
16138
16146
 
16139
- If the user gives an exact anchor (note path, daily note, tag, frontmatter field), prefer operations tools. If the user is recalling fuzzily or asking a conceptual question, prefer \`search_notes\`. After semantic search finds a relevant note, you can read it with \`read_notes\` (passing the path in a one-element array, or batching with sibling paths) to see the details.
16147
+ If the user gives an exact anchor (note path, daily note, tag, frontmatter field), prefer operations tools. If the user is recalling fuzzily or asking a conceptual question, prefer \`search_notes\`. After semantic search finds a relevant note, you can read it with \`read_notes\` (passing the path as a single string, or batching with sibling paths in an array) to see the details.
16140
16148
 
16141
16149
  For tag-driven questions ("which notes are tagged X?", "show me everything in #ai") use \`query_notes\` with \`{ filter: { tags: '<name>' } }\`, not \`search_notes\` \u2014 the answer is exact, not fuzzy.
16142
16150
  `;