/** * @fileoverview Tool registration barrel. Tools are split into read-only and * write groups so the entry point can wrap the write set with `disabledTool()` * when `OBSIDIAN_READ_ONLY=true`. The command-palette pair is exported * separately so the entry point wraps it with `disabledTool()` when either * `OBSIDIAN_ENABLE_COMMANDS=false` or `OBSIDIAN_READ_ONLY=true` — keeping this * module free of eager config reads. `obsidian_search_notes` is exposed as a * factory (`buildSearchNotesTool`) because its mode enum follows * `omnisearchAvailability`, which the entry point decides at startup: the * `omnisearch` mode is withheld under a read scope and otherwise offered only * when the startup probe reaches the plugin. * `obsidian_delete_note` is exposed as a factory (`buildDeleteNoteTool`) * because its description and confirmation round follow * `OBSIDIAN_DELETE_ELICITATION`, which the entry point reads. * @module mcp-server/tools/definitions/index */ export { buildDeleteNoteTool } from './obsidian-delete-note.tool.js'; export { buildSearchNotesTool, type OmnisearchAvailability, omnisearchAvailability, } from './obsidian-search-notes.tool.js'; /** * Tools that don't depend on runtime probes — always registered, even with * `OBSIDIAN_READ_ONLY=true`. `obsidian_search_notes` is constructed separately * in the entry point via `buildSearchNotesTool` so its mode enum can reflect * Omnisearch availability. * * `obsidian_open_in_ui` stays here rather than in the write bucket so that * opening a note that already exists keeps working on a read-only vault, which * is both useful and side-effect-free. Its one create-capable branch — an open * against a missing path with `failIfMissing: false`, which Obsidian would * materialize — is gated as a write inside `ObsidianService.openInUi`, so * read-only mode and `OBSIDIAN_WRITE_PATHS` still bind it. */ export declare const readToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolDefinition; target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{ type: import("zod").ZodLiteral<"path">; path: import("zod").ZodString; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ type: import("zod").ZodLiteral<"active">; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ type: import("zod").ZodLiteral<"periodic">; period: import("zod").ZodEnum<{ daily: "daily"; monthly: "monthly"; quarterly: "quarterly"; weekly: "weekly"; yearly: "yearly"; }>; date: import("zod").ZodOptional; }, import("zod/v4/core").$strip>], "type">; section: import("zod").ZodOptional; target: import("zod").ZodString; }, import("zod/v4/core").$strip>>; includeLinks: import("zod").ZodDefault; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ result: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{ format: import("zod").ZodLiteral<"content">; path: import("zod").ZodString; content: import("zod").ZodString; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ format: import("zod").ZodLiteral<"full">; path: import("zod").ZodString; content: import("zod").ZodString; frontmatter: import("zod").ZodRecord; tags: import("zod").ZodArray; stat: import("zod").ZodObject<{ ctime: import("zod").ZodNumber; mtime: import("zod").ZodNumber; size: import("zod").ZodNumber; }, import("zod/v4/core").$strip>; outgoingLinks: import("zod").ZodOptional; }, import("zod/v4/core").$strip>>>; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ format: import("zod").ZodLiteral<"document-map">; path: import("zod").ZodString; headings: import("zod").ZodArray; blocks: import("zod").ZodArray; frontmatterFields: import("zod").ZodArray; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ format: import("zod").ZodLiteral<"section">; path: import("zod").ZodString; section: import("zod").ZodObject<{ type: import("zod").ZodEnum<{ block: "block"; frontmatter: "frontmatter"; heading: "heading"; }>; target: import("zod").ZodString; }, import("zod/v4/core").$strip>; sectionTarget: import("zod").ZodOptional; candidates: import("zod").ZodOptional>; valueText: import("zod").ZodOptional; valueJson: import("zod").ZodOptional; }, import("zod/v4/core").$strip>], "format">; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "section_required"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "`format` is \"section\" but no `section` locator was provided."; readonly recovery: "Pass `section: { type, target }` (e.g. `{ type: \"heading\", target: \"Intro\" }`), or use `format: \"full\"` / `\"document-map\"` instead."; }, { readonly reason: "path_forbidden"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden; readonly when: "The target path is outside OBSIDIAN_READ_PATHS (and OBSIDIAN_WRITE_PATHS, since write paths imply read access), or inside OBSIDIAN_DENY_PATHS."; readonly recovery: "Use a path inside the configured read scope. The error data echoes the active scope; a `denied_path` denial carries none, since the operator withholds that path."; }, { readonly reason: "note_missing"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "The vault path does not resolve to an existing note."; readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note."; }, { readonly reason: "ambiguous_path"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict; readonly when: "The parent directory contains multiple files whose names differ only in case (case-sensitive filesystems only)."; readonly recovery: "Retry with one of the exact paths listed in `matches` on the error data."; }, { readonly reason: "no_active_file"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `active` but no file is currently open in Obsidian."; readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead."; }, { readonly reason: "periodic_unsupported"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `periodic` and this vault runs Local REST API v5.0.2 or later without the companion periodic-notes extension, so the `/periodic/` routes are not served at all."; readonly recovery: "Install the periodic-notes extension from https://github.com/coddingtonbear/obsidian-local-rest-api-periodic-notes, or address the note by an explicit vault path."; }, { readonly reason: "periodic_not_found"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `periodic`, the `/periodic/` routes are served on this vault, and no note exists for the requested period."; readonly recovery: "Create the periodic note first or pass an explicit path target."; }, { readonly reason: "periodic_disabled"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings."; readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin."; }, { readonly reason: "section_missing"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "`format` was `\"section\"` and the named heading, block reference, or frontmatter field does not exist in the resolved note."; readonly recovery: "Call obsidian_get_note with format \"document-map\" to list available headings, blocks, and frontmatter fields, then retry with one of those locators."; }, { readonly reason: "path_is_directory"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The supplied path names a folder rather than a note file."; readonly recovery: "Call obsidian_list_notes with this path to list the folder, then retry with the full path of one of the files it returns."; }, { readonly reason: "path_traversal"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The path contains a `.` or `..` segment, which is rejected to prevent vault escape."; readonly recovery: "Supply a vault-relative path with no `.` or `..` segments, e.g. \"Projects/Note.md\". Use obsidian_list_notes to browse the vault."; }], { readonly requestedPath: import("zod").ZodOptional; readonly notice: import("zod").ZodOptional; }> | import("@cyanheads/mcp-ts-core").ToolDefinition; minCount: import("zod").ZodOptional; limit: import("zod").ZodDefault; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ tags: import("zod").ZodArray>; appliedFilters: import("zod").ZodObject<{ nameRegex: import("zod").ZodOptional; minCount: import("zod").ZodOptional; limit: import("zod").ZodNumber; }, import("zod/v4/core").$strip>; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "regex_invalid"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The supplied `nameRegex` is not a valid ECMAScript regex."; readonly recovery: "Use a valid ECMAScript regex (e.g. `^mcp/.*`), or omit nameRegex to disable filtering."; }, { readonly reason: "regex_unsafe"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The supplied `nameRegex` is well-formed but exceeds the 256-character limit or contains nested quantifiers known to cause catastrophic backtracking."; readonly recovery: "Avoid nested quantifiers like `(a+)+` or `(.*)*`. Use a simpler pattern (e.g. `^mcp/.*`), or omit nameRegex to disable filtering."; }], { readonly notice: import("zod").ZodOptional; readonly truncated: import("zod").ZodOptional; readonly shown: import("zod").ZodOptional; readonly cap: import("zod").ZodOptional; }> | import("@cyanheads/mcp-ts-core").ToolDefinition; extension: import("zod").ZodOptional; nameRegex: import("zod").ZodOptional; depth: import("zod").ZodDefault; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ path: import("zod").ZodString; entries: import("zod").ZodArray; truncated: import("zod").ZodOptional; }, import("zod/v4/core").$strip>>; totals: import("zod").ZodObject<{ entries: import("zod").ZodNumber; files: import("zod").ZodNumber; directories: import("zod").ZodNumber; }, import("zod/v4/core").$strip>; appliedFilters: import("zod").ZodObject<{ extension: import("zod").ZodOptional; nameRegex: import("zod").ZodOptional; depth: import("zod").ZodNumber; }, import("zod/v4/core").$strip>; excluded: import("zod").ZodOptional; cap: import("zod").ZodNumber; hint: import("zod").ZodString; }, import("zod/v4/core").$strip>>; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "regex_invalid"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The supplied `nameRegex` is not a valid ECMAScript regex."; readonly recovery: "Use a valid ECMAScript regex (e.g. `^Project.*\\.md$`), or omit nameRegex to disable filtering."; }, { readonly reason: "regex_unsafe"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The supplied `nameRegex` is well-formed but exceeds the 256-character limit or contains nested quantifiers known to cause catastrophic backtracking."; readonly recovery: "Avoid nested quantifiers like `(a+)+` or `(.*)*`. Use a simpler pattern (e.g. `^Project.*\\.md$`), or omit nameRegex to disable filtering."; }, { readonly reason: "path_forbidden"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden; readonly when: "The supplied `path` is outside OBSIDIAN_READ_PATHS and is not a folder on the way to it, or is inside OBSIDIAN_DENY_PATHS. The vault root and the folders leading to a scoped path always list, showing only in-scope entries."; readonly recovery: "List a directory inside the configured read scope, or omit `path` to list from the vault root. The error data echoes the active scope; a `denied_path` denial carries none, since the operator withholds that path."; }, { readonly reason: "directory_missing"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "No listable directory at the supplied `path` — either it does not exist, or it exists and currently holds no files. Sub-directories that disappear mid-walk are silently skipped, so only the root path surfaces this error."; readonly recovery: "List the parent directory to check the spelling and casing. A folder that exists but holds no files reports the same way, since the Local REST API omits empty folders from its listings — add a file to it, or confirm from the parent that the folder is there."; }, { readonly reason: "path_is_file"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The supplied `path` names a file rather than a directory."; readonly recovery: "Read the file with obsidian_get_note instead, or list its parent directory to browse alongside it."; }], { readonly notice: import("zod").ZodOptional; }> | import("@cyanheads/mcp-ts-core").ToolDefinition; newLeaf: import("zod").ZodDefault; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ path: import("zod").ZodString; opened: import("zod").ZodBoolean; createdIfMissing: import("zod").ZodBoolean; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "path_forbidden"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden; readonly when: "The path is outside OBSIDIAN_READ_PATHS or inside OBSIDIAN_DENY_PATHS, or — when the file does not exist and `failIfMissing: false` would have Obsidian create it — outside OBSIDIAN_WRITE_PATHS or blocked by OBSIDIAN_READ_ONLY=true."; readonly recovery: "Open a path inside the configured scope; `op` on the error data names whether read or write access was the one denied. The error data echoes the active scope; a `denied_path` denial carries none, since the operator withholds that path."; }, { readonly reason: "note_missing"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "`failIfMissing: true` (default) and the path does not exist in the vault. Pass `failIfMissing: false` to allow Obsidian to create the file on open."; readonly recovery: "Verify the path with obsidian_list_notes or obsidian_search_notes first — a typo would otherwise materialize as an empty file. If creation is intended, retry with failIfMissing: false."; }, { readonly reason: "ambiguous_path"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict; readonly when: "The parent directory contains multiple files whose names differ only in case (case-sensitive filesystems only)."; readonly recovery: "Retry with one of the exact paths listed in `matches` on the error data."; }, { readonly reason: "path_is_directory"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The supplied path names a folder rather than a file."; readonly recovery: "Call obsidian_list_notes with this path to list the folder, then open one of the files it returns."; }, { readonly reason: "path_traversal"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The path contains a `.` or `..` segment, which is rejected to prevent vault escape."; readonly recovery: "Supply a vault-relative path with no `.` or `..` segments, e.g. \"Projects/Note.md\". Use obsidian_list_notes to browse the vault."; }], { readonly requestedPath: import("zod").ZodOptional; readonly notice: import("zod").ZodOptional; }>)[]; /** * Write tools — wrapped with `disabledTool()` when `OBSIDIAN_READ_ONLY=true`. * `obsidian_delete_note` joins this set in the entry point, built via * `buildDeleteNoteTool`. */ export declare const writeToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolDefinition; path: import("zod").ZodString; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ type: import("zod").ZodLiteral<"active">; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ type: import("zod").ZodLiteral<"periodic">; period: import("zod").ZodEnum<{ daily: "daily"; monthly: "monthly"; quarterly: "quarterly"; weekly: "weekly"; yearly: "yearly"; }>; date: import("zod").ZodOptional; }, import("zod/v4/core").$strip>], "type">; section: import("zod").ZodObject<{ type: import("zod").ZodEnum<{ block: "block"; frontmatter: "frontmatter"; heading: "heading"; }>; target: import("zod").ZodString; }, import("zod/v4/core").$strip>; operation: import("zod").ZodEnum<{ append: "append"; prepend: "prepend"; replace: "replace"; }>; content: import("zod").ZodString; contentType: import("zod").ZodDefault>; patchOptions: import("zod").ZodOptional; applyIfContentPreexists: import("zod").ZodDefault; trimTargetWhitespace: import("zod").ZodDefault; }, import("zod/v4/core").$strip>>; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ path: import("zod").ZodString; section: import("zod").ZodObject<{ type: import("zod").ZodEnum<{ block: "block"; frontmatter: "frontmatter"; heading: "heading"; }>; target: import("zod").ZodString; }, import("zod/v4/core").$strip>; operation: import("zod").ZodEnum<{ append: "append"; prepend: "prepend"; replace: "replace"; }>; previousSizeInBytes: import("zod").ZodNumber; currentSizeInBytes: import("zod").ZodNumber; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "path_forbidden"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden; readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS or inside OBSIDIAN_DENY_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes."; readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope; a `denied_path` denial carries none, since the operator withholds that path."; }, { readonly reason: "note_missing"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "The vault path does not resolve to an existing note."; readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note."; }, { readonly reason: "no_active_file"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `active` but no file is currently open in Obsidian."; readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead."; }, { readonly reason: "periodic_unsupported"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `periodic` and this vault runs Local REST API v5.0.2 or later without the companion periodic-notes extension, so the `/periodic/` routes are not served at all."; readonly recovery: "Install the periodic-notes extension from https://github.com/coddingtonbear/obsidian-local-rest-api-periodic-notes, or address the note by an explicit vault path."; }, { readonly reason: "periodic_not_found"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `periodic`, the `/periodic/` routes are served on this vault, and no note exists for the requested period."; readonly recovery: "Create the periodic note first or pass an explicit path target."; }, { readonly reason: "periodic_disabled"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings."; readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin."; }, { readonly reason: "section_target_missing"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The named heading/block/frontmatter field does not exist in the note. Use `obsidian_get_note` with `format: \"document-map\"` to discover available targets."; readonly recovery: "Call obsidian_get_note with format document-map to discover the available targets."; }, { readonly reason: "ambiguous_section"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict; readonly when: "A bare heading leaf name matches more than one heading in the note, or the resolved full heading path occurs more than once, so the write target is undetermined."; readonly recovery: "Retry with a distinct full Parent::Child heading path from `candidates` on the error data; when every candidate is the same path, rename the repeated headings first."; }, { readonly reason: "content_preexists"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The supplied content already appears at the target — the patch was rejected to keep retries idempotent (the default)."; readonly recovery: "Pass `patchOptions.applyIfContentPreexists: true` to force-apply over preexisting content, or change the content to something not already present."; }, { readonly reason: "heading_outside_section"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "On Local REST API v5.0 and later, the content of a heading write carries a heading at or above the target section’s own level, which would have to sit outside the section."; readonly recovery: "Append the heading at the parent section or at the end of the note with obsidian_append_to_note, or write it one level below the target section or deeper."; }, { readonly reason: "repeated_link_definition"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict; readonly when: "A link reference definition that repeats a label defined earlier in the note sits above where the target heading’s section ends (for the last section, above its heading); the Local REST API’s markdown parser drops it and misplaces every heading below it, so the write would land outside the section."; readonly recovery: "Use obsidian_replace_in_note to place the content directly, or to remove or rename the repeated definition at `line`, then retry the section write."; }, { readonly reason: "patch_rejected"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The target exists but the plugin refused the content for it — table rows for a block that is not a table, a row with the wrong cell count, a frontmatter value that cannot merge, or content of the wrong shape."; readonly recovery: "Read the target with obsidian_get_note format section, then send content that fits it — rows matching the table columns, or a value of the field’s own type."; }, { readonly reason: "path_is_directory"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The supplied path names a folder rather than a note file."; readonly recovery: "Call obsidian_list_notes with this path to list the folder, then retry with the full path of one of the files it returns."; }, { readonly reason: "path_traversal"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The path contains a `.` or `..` segment, which is rejected to prevent vault escape."; readonly recovery: "Supply a vault-relative path with no `.` or `..` segments, e.g. \"Projects/Note.md\". Use obsidian_list_notes to browse the vault."; }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition; path: import("zod").ZodString; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ type: import("zod").ZodLiteral<"active">; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ type: import("zod").ZodLiteral<"periodic">; period: import("zod").ZodEnum<{ daily: "daily"; monthly: "monthly"; quarterly: "quarterly"; weekly: "weekly"; yearly: "yearly"; }>; date: import("zod").ZodOptional; }, import("zod/v4/core").$strip>], "type">; content: import("zod").ZodString; section: import("zod").ZodOptional; target: import("zod").ZodString; }, import("zod/v4/core").$strip>>; contentType: import("zod").ZodDefault>; overwrite: import("zod").ZodDefault; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ path: import("zod").ZodString; sectionTargeted: import("zod").ZodBoolean; sectionTarget: import("zod").ZodOptional; created: import("zod").ZodBoolean; previousSizeInBytes: import("zod").ZodNumber; currentSizeInBytes: import("zod").ZodNumber; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "file_exists"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict; readonly when: "Whole-file write was attempted against an existing note and `overwrite` was not set to `true`."; readonly recovery: "Retry with overwrite true or use obsidian_patch_note for in-place edits."; }, { readonly reason: "case_variant_exists"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict; readonly when: "Whole-file write to a path that differs from an existing note only in letter case, on a case-insensitive filesystem (macOS, Windows) where both name one file. `existingPath` names that note when the parent folder listing shows exactly one case match; it is omitted when several match, and when a file Obsidian does not index, such as a dot-file, already sits at the path."; readonly recovery: "Retry with the path in `existingPath` on the error data, which names the same file. Without `existingPath`, list the folder with obsidian_list_notes and use the spelling it shows, or choose another path."; }, { readonly reason: "path_forbidden"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden; readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS or inside OBSIDIAN_DENY_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes."; readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope; a `denied_path` denial carries none, since the operator withholds that path."; }, { readonly reason: "note_missing"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Section replace targets a path that does not resolve to an existing note (PATCH requires the file to exist)."; readonly recovery: "Verify the path with obsidian_list_notes, or omit `section` to fall back to whole-file write (which creates the note when it is absent)."; }, { readonly reason: "no_active_file"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `active` but no file is currently open in Obsidian."; readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead."; }, { readonly reason: "periodic_unsupported"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `periodic` and this vault runs Local REST API v5.0.2 or later without the companion periodic-notes extension, so the `/periodic/` routes are not served at all."; readonly recovery: "Install the periodic-notes extension from https://github.com/coddingtonbear/obsidian-local-rest-api-periodic-notes, or address the note by an explicit vault path."; }, { readonly reason: "periodic_not_found"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `periodic`, the `/periodic/` routes are served on this vault, and no note exists for the requested period."; readonly recovery: "Create the periodic note first or pass an explicit path target."; }, { readonly reason: "periodic_disabled"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings."; readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin."; }, { readonly reason: "section_target_missing"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "`section` was provided but the named heading/block/frontmatter field does not exist in the note."; readonly recovery: "Call obsidian_get_note with format document-map to discover available targets."; }, { readonly reason: "ambiguous_section"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict; readonly when: "A bare heading leaf name matches more than one heading in the note, or the resolved full heading path occurs more than once, so the replacement target is undetermined."; readonly recovery: "Retry with a distinct full Parent::Child heading path from `candidates` on the error data; when every candidate is the same path, rename the repeated headings first."; }, { readonly reason: "heading_outside_section"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "On Local REST API v5.0 and later, the new body of a heading section carries a heading at or above that section’s own level, which would have to sit outside the section."; readonly recovery: "Append the heading at the parent section or at the end of the note with obsidian_append_to_note, or write it one level below the target section or deeper."; }, { readonly reason: "repeated_link_definition"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict; readonly when: "A link reference definition that repeats a label defined earlier in the note sits above where the target heading’s section ends (for the last section, above its heading); the Local REST API’s markdown parser drops it and misplaces every heading below it, so the replacement would land outside the section."; readonly recovery: "Use obsidian_replace_in_note to place the new body directly, or to remove or rename the repeated definition at `line`, then retry the section write."; }, { readonly reason: "patch_rejected"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The section exists but the plugin refused the new content for it — table rows for a block that is not a table, a row with the wrong cell count, or content of the wrong shape."; readonly recovery: "Read the target with obsidian_get_note format section, then send content that fits it — rows matching the table columns, or a value of the field’s own type."; }, { readonly reason: "path_is_directory"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The supplied path names a folder rather than a note file."; readonly recovery: "Call obsidian_list_notes with this path to list the folder, then retry with the full path of one of the files it returns."; }, { readonly reason: "path_traversal"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The path contains a `.` or `..` segment, which is rejected to prevent vault escape."; readonly recovery: "Supply a vault-relative path with no `.` or `..` segments, e.g. \"Projects/Note.md\". Use obsidian_list_notes to browse the vault."; }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition; path: import("zod").ZodString; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ type: import("zod").ZodLiteral<"active">; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ type: import("zod").ZodLiteral<"periodic">; period: import("zod").ZodEnum<{ daily: "daily"; monthly: "monthly"; quarterly: "quarterly"; weekly: "weekly"; yearly: "yearly"; }>; date: import("zod").ZodOptional; }, import("zod/v4/core").$strip>], "type">; content: import("zod").ZodString; section: import("zod").ZodOptional; target: import("zod").ZodString; }, import("zod/v4/core").$strip>>; contentType: import("zod").ZodDefault>; createTargetIfMissing: import("zod").ZodDefault; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ path: import("zod").ZodString; sectionTargeted: import("zod").ZodBoolean; sectionTarget: import("zod").ZodOptional; created: import("zod").ZodBoolean; previousSizeInBytes: import("zod").ZodNumber; currentSizeInBytes: import("zod").ZodNumber; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "case_variant_exists"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict; readonly when: "Whole-file append to a path that differs from an existing note only in letter case, on a case-insensitive filesystem (macOS, Windows) where both name one file. `existingPath` names that note when the parent folder listing shows exactly one case match; it is omitted when several match, and when a file Obsidian does not index, such as a dot-file, already sits at the path."; readonly recovery: "Retry with the path in `existingPath` on the error data, which names the same file. Without `existingPath`, list the folder with obsidian_list_notes and use the spelling it shows, or choose another path."; }, { readonly reason: "path_forbidden"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden; readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS or inside OBSIDIAN_DENY_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes."; readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope; a `denied_path` denial carries none, since the operator withholds that path."; }, { readonly reason: "note_missing"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Section append targets a path that does not resolve to an existing note (PATCH requires the file to exist)."; readonly recovery: "Verify the path with obsidian_list_notes, or omit `section` to fall back to whole-file append (which creates the note if missing)."; }, { readonly reason: "no_active_file"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `active` but no file is currently open in Obsidian."; readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead."; }, { readonly reason: "periodic_unsupported"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `periodic` and this vault runs Local REST API v5.0.2 or later without the companion periodic-notes extension, so the `/periodic/` routes are not served at all."; readonly recovery: "Install the periodic-notes extension from https://github.com/coddingtonbear/obsidian-local-rest-api-periodic-notes, or address the note by an explicit vault path."; }, { readonly reason: "periodic_not_found"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `periodic`, the `/periodic/` routes are served on this vault, and no note exists for the requested period."; readonly recovery: "Create the periodic note first or pass an explicit path target."; }, { readonly reason: "periodic_disabled"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings."; readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin."; }, { readonly reason: "section_target_missing"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "`section` was provided but the named heading/block/frontmatter field does not exist in the note."; readonly recovery: "Call obsidian_get_note with format document-map to discover available targets, or pass createTargetIfMissing: true to bring it into existence."; }, { readonly reason: "ambiguous_section"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict; readonly when: "A bare heading leaf name matches more than one heading in the note, or the resolved full heading path occurs more than once, so the append target is undetermined."; readonly recovery: "Retry with a distinct full Parent::Child heading path from `candidates` on the error data; when every candidate is the same path, rename the repeated headings first."; }, { readonly reason: "content_preexists"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "Section append where the supplied content already appears at the target — rejected to keep retries idempotent (the default for the section path)."; readonly recovery: "Change the content to something not already present at the target, or use obsidian_patch_note with `patchOptions.applyIfContentPreexists: true` if a duplicate is intended."; }, { readonly reason: "heading_outside_section"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "On Local REST API v5.0 and later, content appended to a heading carries a heading at or above that section’s own level, which would have to sit outside the section."; readonly recovery: "Append the heading at the parent section or at the end of the note (no `section`), or write it one level below the target section or deeper."; }, { readonly reason: "repeated_link_definition"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Conflict; readonly when: "A link reference definition that repeats a label defined earlier in the note sits above where the target heading’s section ends (for the last section, above its heading); the Local REST API’s markdown parser drops it and misplaces every heading below it, so the append would land outside the section."; readonly recovery: "Use obsidian_replace_in_note to place the content directly, or to remove or rename the repeated definition at `line`, then retry the section append."; }, { readonly reason: "patch_rejected"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The section exists but the plugin refused the content for it — table rows for a block that is not a table, a row with the wrong cell count, a frontmatter value that cannot merge, or content of the wrong shape."; readonly recovery: "Read the target with obsidian_get_note format section, then send content that fits it — rows matching the table columns, or a value of the field’s own type."; }, { readonly reason: "path_is_directory"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The supplied path names a folder rather than a note file."; readonly recovery: "Call obsidian_list_notes with this path to list the folder, then retry with the full path of one of the files it returns."; }, { readonly reason: "path_traversal"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The path contains a `.` or `..` segment, which is rejected to prevent vault escape."; readonly recovery: "Supply a vault-relative path with no `.` or `..` segments, e.g. \"Projects/Note.md\". Use obsidian_list_notes to browse the vault."; }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition; path: import("zod").ZodString; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ type: import("zod").ZodLiteral<"active">; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ type: import("zod").ZodLiteral<"periodic">; period: import("zod").ZodEnum<{ daily: "daily"; monthly: "monthly"; quarterly: "quarterly"; weekly: "weekly"; yearly: "yearly"; }>; date: import("zod").ZodOptional; }, import("zod/v4/core").$strip>], "type">; scope: import("zod").ZodDefault>; replacements: import("zod").ZodArray; caseSensitive: import("zod").ZodDefault; wholeWord: import("zod").ZodDefault; flexibleWhitespace: import("zod").ZodDefault; replaceAll: import("zod").ZodDefault; }, import("zod/v4/core").$strip>>; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ path: import("zod").ZodString; totalReplacements: import("zod").ZodNumber; perReplacement: import("zod").ZodArray>; previousSizeInBytes: import("zod").ZodNumber; currentSizeInBytes: import("zod").ZodNumber; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "path_forbidden"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden; readonly when: "The target path is outside OBSIDIAN_WRITE_PATHS or inside OBSIDIAN_DENY_PATHS, or OBSIDIAN_READ_ONLY=true denies all writes. The pre-read also requires the path to be readable."; readonly recovery: "Use a path inside the configured write scope. The error data echoes the active scope; a `denied_path` denial carries none, since the operator withholds that path."; }, { readonly reason: "regex_invalid"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "A `useRegex: true` replacement supplied a `search` pattern that is not a valid ECMAScript regex."; readonly recovery: "Use a valid ECMAScript regex, or set useRegex to false to match `search` as a literal string."; }, { readonly reason: "regex_unsafe"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "A `useRegex: true` replacement supplied a `search` pattern that is well-formed but exceeds the 1024-character limit or contains nested quantifiers known to cause catastrophic backtracking against the note body."; readonly recovery: "Avoid nested quantifiers like `(a+)+` or `(.*)*`. Use a simpler pattern, or set useRegex to false to match `search` as a literal string."; }, { readonly reason: "frontmatter_invalid"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "A `scope` of \"frontmatter\" or \"both\" produced YAML that no longer parses as a mapping of properties, or that parses but cannot be re-emitted (an alias whose anchor the replacement removed). Nothing is written — the note keeps its original bytes. The check reads the rewritten YAML only, so a replacement that renames a key or changes a scalar's type while still parsing is not caught by it."; readonly recovery: "Narrow the search so it cannot match inside the YAML, or leave scope at \"body\" and edit the property with obsidian_manage_frontmatter."; }, { readonly reason: "note_missing"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "The vault path does not resolve to an existing note."; readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note."; }, { readonly reason: "no_active_file"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `active` but no file is currently open in Obsidian."; readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead."; }, { readonly reason: "periodic_unsupported"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `periodic` and this vault runs Local REST API v5.0.2 or later without the companion periodic-notes extension, so the `/periodic/` routes are not served at all."; readonly recovery: "Install the periodic-notes extension from https://github.com/coddingtonbear/obsidian-local-rest-api-periodic-notes, or address the note by an explicit vault path."; }, { readonly reason: "periodic_not_found"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `periodic`, the `/periodic/` routes are served on this vault, and no note exists for the requested period."; readonly recovery: "Create the periodic note first or pass an explicit path target."; }, { readonly reason: "periodic_disabled"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings."; readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin."; }, { readonly reason: "path_is_directory"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The supplied path names a folder rather than a note file."; readonly recovery: "Call obsidian_list_notes with this path to list the folder, then retry with the full path of one of the files it returns."; }, { readonly reason: "path_traversal"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The path contains a `.` or `..` segment, which is rejected to prevent vault escape."; readonly recovery: "Supply a vault-relative path with no `.` or `..` segments, e.g. \"Projects/Note.md\". Use obsidian_list_notes to browse the vault."; }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition; target: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{ type: import("zod").ZodLiteral<"path">; path: import("zod").ZodString; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ type: import("zod").ZodLiteral<"active">; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ type: import("zod").ZodLiteral<"periodic">; period: import("zod").ZodEnum<{ daily: "daily"; monthly: "monthly"; quarterly: "quarterly"; weekly: "weekly"; yearly: "yearly"; }>; date: import("zod").ZodOptional; }, import("zod/v4/core").$strip>], "type">; key: import("zod").ZodString; value: import("zod").ZodOptional; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ result: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{ operation: import("zod").ZodLiteral<"get">; path: import("zod").ZodString; key: import("zod").ZodString; exists: import("zod").ZodBoolean; value: import("zod").ZodUnknown; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ operation: import("zod").ZodLiteral<"set">; path: import("zod").ZodString; key: import("zod").ZodString; frontmatter: import("zod").ZodRecord; previousSizeInBytes: import("zod").ZodNumber; currentSizeInBytes: import("zod").ZodNumber; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ operation: import("zod").ZodLiteral<"delete">; path: import("zod").ZodString; key: import("zod").ZodString; frontmatter: import("zod").ZodRecord; previousSizeInBytes: import("zod").ZodNumber; currentSizeInBytes: import("zod").ZodNumber; }, import("zod/v4/core").$strip>], "operation">; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "path_forbidden"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden; readonly when: "`get` requires the path to be readable; `set`/`delete` require it to be inside OBSIDIAN_WRITE_PATHS, with OBSIDIAN_READ_ONLY=false. A path inside OBSIDIAN_DENY_PATHS is neither."; readonly recovery: "Use a path inside the configured scope. The error data echoes the active scope; a `denied_path` denial carries none, since the operator withholds that path."; }, { readonly reason: "value_required"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "`operation` is \"set\" but no `value` was supplied."; readonly recovery: "Pass `value` as any JSON-typed value: string, number, boolean, array, or object (e.g. `\"draft\"`, `42`, `true`, `[\"a\",\"b\"]`)."; }, { readonly reason: "frontmatter_invalid"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "`operation` is \"delete\" and the note's existing frontmatter does not parse as a mapping of properties, or removing the key would leave YAML that cannot be re-emitted (an alias whose anchor went with it). Nothing is written — the note keeps its original bytes."; readonly recovery: "Read the block with obsidian_get_note (format \"content\"), repair the YAML between the `---` fences, then retry the delete."; }, { readonly reason: "note_missing"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "The vault path does not resolve to an existing note."; readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note."; }, { readonly reason: "no_active_file"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `active` but no file is currently open in Obsidian."; readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead."; }, { readonly reason: "periodic_unsupported"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `periodic` and this vault runs Local REST API v5.0.2 or later without the companion periodic-notes extension, so the `/periodic/` routes are not served at all."; readonly recovery: "Install the periodic-notes extension from https://github.com/coddingtonbear/obsidian-local-rest-api-periodic-notes, or address the note by an explicit vault path."; }, { readonly reason: "periodic_not_found"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `periodic`, the `/periodic/` routes are served on this vault, and no note exists for the requested period."; readonly recovery: "Create the periodic note first or pass an explicit path target."; }, { readonly reason: "periodic_disabled"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings."; readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin."; }, { readonly reason: "path_is_directory"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The supplied path names a folder rather than a note file."; readonly recovery: "Call obsidian_list_notes with this path to list the folder, then retry with the full path of one of the files it returns."; }, { readonly reason: "path_traversal"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The path contains a `.` or `..` segment, which is rejected to prevent vault escape."; readonly recovery: "Supply a vault-relative path with no `.` or `..` segments, e.g. \"Projects/Note.md\". Use obsidian_list_notes to browse the vault."; }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition; path: import("zod").ZodString; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ type: import("zod").ZodLiteral<"active">; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ type: import("zod").ZodLiteral<"periodic">; period: import("zod").ZodEnum<{ daily: "daily"; monthly: "monthly"; quarterly: "quarterly"; weekly: "weekly"; yearly: "yearly"; }>; date: import("zod").ZodOptional; }, import("zod/v4/core").$strip>], "type">; operation: import("zod").ZodEnum<{ add: "add"; list: "list"; remove: "remove"; }>; tags: import("zod").ZodOptional>; location: import("zod").ZodDefault>; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ result: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{ operation: import("zod").ZodLiteral<"list">; path: import("zod").ZodString; tags: import("zod").ZodObject<{ frontmatter: import("zod").ZodArray; inline: import("zod").ZodArray; all: import("zod").ZodArray; }, import("zod/v4/core").$strip>; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ operation: import("zod").ZodLiteral<"add">; path: import("zod").ZodString; applied: import("zod").ZodArray; skipped: import("zod").ZodArray; tags: import("zod").ZodArray; previousSizeInBytes: import("zod").ZodNumber; currentSizeInBytes: import("zod").ZodNumber; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ operation: import("zod").ZodLiteral<"remove">; path: import("zod").ZodString; applied: import("zod").ZodArray; skipped: import("zod").ZodArray; tags: import("zod").ZodArray; previousSizeInBytes: import("zod").ZodNumber; currentSizeInBytes: import("zod").ZodNumber; }, import("zod/v4/core").$strip>], "operation">; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "path_forbidden"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Forbidden; readonly when: "`list` requires the path to be readable; `add`/`remove` require it to be inside OBSIDIAN_WRITE_PATHS, with OBSIDIAN_READ_ONLY=false. A path inside OBSIDIAN_DENY_PATHS is neither."; readonly recovery: "Use a path inside the configured scope. The error data echoes the active scope; a `denied_path` denial carries none, since the operator withholds that path."; }, { readonly reason: "tags_required"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "`operation` is \"add\" or \"remove\" but `tags` was empty or omitted."; readonly recovery: "Pass a non-empty `tags` array (without `#`), e.g. `[\"draft\", \"wip\"]`."; }, { readonly reason: "frontmatter_invalid"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "`location` reaches the frontmatter and the note's existing block does not parse as a mapping of properties, or the tag change would leave YAML that cannot be re-emitted. Nothing is written — the note keeps its original bytes, and under `location: \"both\"` the inline half is skipped too rather than applied on its own."; readonly recovery: "Use `location: \"inline\"` to tag the body without touching the block, or repair the YAML between the `---` fences and retry."; }, { readonly reason: "note_missing"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "The vault path does not resolve to an existing note."; readonly recovery: "Verify the path with obsidian_list_notes or use obsidian_search_notes to locate the note."; }, { readonly reason: "no_active_file"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `active` but no file is currently open in Obsidian."; readonly recovery: "Call obsidian_open_in_ui to focus a file, or pass an explicit path target instead."; }, { readonly reason: "periodic_unsupported"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `periodic` and this vault runs Local REST API v5.0.2 or later without the companion periodic-notes extension, so the `/periodic/` routes are not served at all."; readonly recovery: "Install the periodic-notes extension from https://github.com/coddingtonbear/obsidian-local-rest-api-periodic-notes, or address the note by an explicit vault path."; }, { readonly reason: "periodic_not_found"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Target was `periodic`, the `/periodic/` routes are served on this vault, and no note exists for the requested period."; readonly recovery: "Create the periodic note first or pass an explicit path target."; }, { readonly reason: "periodic_disabled"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "Target was `periodic` but the requested period is not enabled in Obsidian's Periodic Notes plugin settings."; readonly recovery: "Pass an explicit path target — the requested period is disabled in the operator's Periodic Notes plugin."; }, { readonly reason: "path_is_directory"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The supplied path names a folder rather than a note file."; readonly recovery: "Call obsidian_list_notes with this path to list the folder, then retry with the full path of one of the files it returns."; }, { readonly reason: "path_traversal"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The path contains a `.` or `..` segment, which is rejected to prevent vault escape."; readonly recovery: "Supply a vault-relative path with no `.` or `..` segments, e.g. \"Projects/Note.md\". Use obsidian_list_notes to browse the vault."; }], undefined>)[]; /** Command-palette tools — opt-in via `OBSIDIAN_ENABLE_COMMANDS=true`; suppressed by `OBSIDIAN_READ_ONLY=true`. */ export declare const commandToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolDefinition; }, import("zod/v4/core").$strip>, import("zod").ZodObject<{ commands: import("zod").ZodArray>; appliedFilters: import("zod").ZodOptional; }, import("zod/v4/core").$strip>>; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "regex_invalid"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The supplied `nameRegex` is not a valid ECMAScript regex."; readonly recovery: "Use a valid ECMAScript regex (e.g. `^Templater`), or omit nameRegex to disable filtering."; }, { readonly reason: "regex_unsafe"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The supplied `nameRegex` is well-formed but exceeds the 256-character limit or contains nested quantifiers known to cause catastrophic backtracking."; readonly recovery: "Avoid nested quantifiers like `(a+)+` or `(.*)*`. Use a simpler pattern (e.g. `^Templater`), or omit nameRegex to disable filtering."; }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition, import("zod").ZodObject<{ commandId: import("zod").ZodString; executed: import("zod").ZodBoolean; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "command_unknown"; readonly thrownBy: "service"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "The supplied `commandId` is not registered in Obsidian. Use `obsidian_list_commands` to discover valid IDs."; readonly recovery: "Call obsidian_list_commands to discover the registered command IDs."; }], undefined>)[]; //# sourceMappingURL=index.d.ts.map