### Build and Test Obsidian MCP Server Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/README.md Instructions for setting up the development environment, building the project, and running the server locally using different transport mechanisms. Includes commands for dependency installation, compilation, code formatting, and inspection. ```bash # Install dependencies npm install # Build the project (compile TS to JS in dist/ and make executable) npm run rebuild # Start the server locally using stdio transport npm start:stdio # Start the server using http transport npm run start:http # Format code using Prettier npm run format # Inspect the server's capabilities using the MCP Inspector tool npm run inspect:stdio # or for the http transport: npm run inspect:http ``` -------------------------------- ### Configure MCP Client to Run obsidian-mcp-server with npx Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/README.md This JSON configuration snippet for the MCP client (e.g., `cline_mcp_settings.json`) sets up the `obsidian-mcp-server` to be run using `npx`. It automatically downloads and installs the package if not already present, and includes essential environment variables for connecting to the Obsidian Local REST API. ```json { "mcpServers": { "obsidian-mcp-server": { "command": "npx", "args": ["obsidian-mcp-server"], "env": { "OBSIDIAN_API_KEY": "YOUR_API_KEY_FROM_OBSIDIAN_PLUGIN", "OBSIDIAN_BASE_URL": "http://127.0.0.1:27123", "OBSIDIAN_VERIFY_SSL": "false", "OBSIDIAN_ENABLE_CACHE": "true" }, "disabled": false, "autoApprove": [] } } } ``` -------------------------------- ### Configure Environment Variables for Obsidian API Connection Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/README.md This configuration block sets up the necessary environment variables for the MCP server to connect to the Obsidian Local REST API. It includes examples for both non-encrypted HTTP and encrypted HTTPS connections, detailing how to handle SSL verification for the latter. ```json { "env": { "OBSIDIAN_API_KEY": "YOUR_API_KEY_FROM_OBSIDIAN_PLUGIN", "OBSIDIAN_BASE_URL": "http://127.0.0.1:27123" } } ``` ```json { "env": { "OBSIDIAN_API_KEY": "YOUR_API_KEY_FROM_OBSIDIAN_PLUGIN", "OBSIDIAN_BASE_URL": "https://127.0.0.1:27124", "OBSIDIAN_VERIFY_SSL": "false" } } ``` -------------------------------- ### Execute Obsidian Dataview Queries Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md This tool enables the execution of Dataview Query Language (DQL) strings and returns the structured results. It is considered the most powerful querying tool within the Obsidian ecosystem, allowing agents to answer complex questions about note content and metadata. This tool requires the Dataview plugin to be installed in Obsidian and leverages the `searchComplex` method of the `ObsidianRestApiService`. ```APIDOC Tool Name: obsidian_dataview_query Purpose: To execute a Dataview Query Language (DQL) string and return the structured results. This is the most powerful querying tool in the Obsidian ecosystem. Input Schema: query: z.string() - The Dataview Query Language (DQL) string. Output: A JSON representation of the Dataview table or list result. { success: true, results: [{...}, {...}] } Usage Examples: - "List all unfinished tasks from my project notes." Query: TASK from #project WHERE !completed - "Show me all books I rated 5 stars." Query: TABLE rating from #book WHERE rating = 5 - "Find all meeting notes from the last 7 days." Query: LIST from #meeting WHERE file.cday >= date(today) - dur(7 days) ``` -------------------------------- ### MCP Server Project Directory Structure Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/README.md This snippet illustrates the modular organization of the MCP server codebase within the `src/` directory. It highlights key components like the entry point, configuration, core server logic, external service abstractions, and utility functions, providing a high-level overview of the project's architecture. ```text src/ ├── index.ts # Entry point: Initializes and starts the server ├── config/ # Configuration loading (env vars, package info) │ └── index.ts ├── mcp-server/ # Core MCP server logic and capability registration │ ├── server.ts # Server setup, transport handling, tool/resource registration │ ├── resources/ # MCP Resource implementations (currently none) │ ├── tools/ # MCP Tool implementations (subdirs per tool) │ └── transports/ # Stdio and HTTP transport logic │ └── auth/ # Authentication strategies (JWT, OAuth) ├── services/ # Abstractions for external APIs or internal caching │ └── obsidianRestAPI/ # Typed client for Obsidian Local REST API ├── types-global/ # Shared TypeScript type definitions (errors, etc.) └── utils/ # Common utility functions (logger, error handler, security, etc.) ``` -------------------------------- ### Configure MCP Client to Run obsidian-mcp-server from Local Build Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/README.md This JSON configuration snippet for the MCP client (e.g., `cline_mcp_settings.json`) sets up the `obsidian-mcp-server` to be run from a local source build. It specifies the `node` command and the path to the `index.js` file, along with environment variables for the Obsidian Local REST API. ```json { "mcpServers": { "obsidian-mcp-server": { "command": "node", "args": ["/path/to/your/obsidian-mcp-server/dist/index.js"], "env": { "OBSIDIAN_API_KEY": "YOUR_OBSIDIAN_API_KEY", "OBSIDIAN_BASE_URL": "http://127.0.0.1:27123", "OBSIDIAN_VERIFY_SSL": "false", "OBSIDIAN_ENABLE_CACHE": "true" } } } } ``` -------------------------------- ### Obsidian MCP Server Tools API Reference Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/README.md Comprehensive reference for the tools provided by the Obsidian MCP Server, callable via the Model Context Protocol. These tools enable various operations on an Obsidian vault, including reading, updating, searching, and managing notes, frontmatter, and tags. All tools return structured JSON responses and include error handling. ```APIDOC Obsidian MCP Server Tools: obsidian_read_note - Description: Retrieves the content and metadata of a note. - Parameters: - filePath (string): The path to the note. - format? (string): Optional. The desired output format (e.g., 'markdown', 'html'). - includeStat? (boolean): Optional. Whether to include file statistics in the response. - Returns: Structured JSON response containing note content and metadata. obsidian_update_note - Description: Modifies a file by appending, prepending, or overwriting its content. - Parameters: - targetType (string): Specifies the modification type ('append', 'prepend', 'overwrite'). - content (string): The content to be applied. - targetIdentifier? (string): Optional. An identifier to target specific content within the file (e.g., a section heading). - wholeFileMode (boolean): If true, applies changes to the entire file, ignoring targetIdentifier. - Returns: Structured JSON response indicating the success or failure of the update operation. obsidian_search_replace - Description: Performs search-and-replace operations within a note. - Parameters: - targetType (string): Specifies the scope of the operation (e.g., 'note', 'selection'). - replacements (array of objects): An array of objects, each with 'search' (string) and 'replace' (string) properties. - useRegex? (boolean): Optional. If true, 'search' patterns are treated as regular expressions. - replaceAll? (boolean): Optional. If true, replaces all occurrences; otherwise, only the first. - Returns: Structured JSON response detailing the changes made. obsidian_global_search - Description: Searches the entire vault for content matching a query. - Parameters: - query (string): The search query. - searchInPath? (string): Optional. A path to restrict the search to a specific directory. - useRegex? (boolean): Optional. If true, the query is treated as a regular expression. - page? (number): Optional. The page number for paginated results. - pageSize? (number): Optional. The number of results per page. - Returns: Structured JSON response with a list of matching notes and their details. obsidian_list_notes - Description: Lists notes and subdirectories within a specified folder. - Parameters: - dirPath (string): The directory path to list. - fileExtensionFilter? (string): Optional. Filters results by file extension (e.g., 'md', 'txt'). - nameRegexFilter? (string): Optional. Filters results by a regular expression applied to file names. - Returns: Structured JSON response with lists of files and subdirectories. obsidian_manage_frontmatter - Description: Gets, sets, or deletes keys in a note's frontmatter. - Parameters: - filePath (string): The path to the note. - operation (string): The operation to perform ('get', 'set', 'delete'). - key (string): The frontmatter key to operate on. - value? (any): Optional. The value to set for the key (required for 'set' operation). - Returns: Structured JSON response with the frontmatter value (for 'get') or status of the operation. obsidian_manage_tags - Description: Adds, removes, or lists tags in a note. - Parameters: - filePath (string): The path to the note. - operation (string): The operation to perform ('add', 'remove', 'list'). - tags (array of strings): The tags to add or remove (required for 'add' and 'remove'). - Returns: Structured JSON response with the updated list of tags (for 'list') or status of the operation. obsidian_delete_note - Description: Permanently deletes a note from the vault. - Parameters: - filePath (string): The path to the note to be deleted. - Returns: Structured JSON response indicating the success or failure of the deletion. ``` -------------------------------- ### List All Available Obsidian Application Commands Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md Retrieves a list of all available commands within the Obsidian application. ```APIDOC obsidian_list_commands() - Description: Retrieves a list of all available commands within the Obsidian application. - Parameters: None. - Returns: An array of `ObsidianCommand` objects, each containing the command's `id` and `name`. ``` -------------------------------- ### Obsidian Vault Interaction Tools for AI Agents Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/README.md A collection of specialized tools for AI agents to interact with an Obsidian vault, enabling operations like reading, updating, searching, and managing notes and their metadata. These tools leverage the Obsidian Local REST API plugin to provide programmatic access. ```APIDOC obsidian_read_note Description: Retrieves the content and metadata of a specified note. Key Features: - Read in `markdown` or `json` format. - Case-insensitive path fallback. - Includes file stats (creation/modification time). obsidian_update_note Description: Modifies notes using whole-file operations. Key Features: - `append`, `prepend`, or `overwrite` content. - Can create files if they don't exist. - Targets files by path, active note, or periodic note. obsidian_search_replace Description: Performs search-and-replace operations within a target note. Key Features: - Supports string or regex search. - Options for case sensitivity, whole word, and replacing all occurrences. obsidian_global_search Description: Performs a search across the entire vault. Key Features: - Text or regex search. - Filter by path and modification date. - Paginated results. obsidian_list_notes Description: Lists notes and subdirectories within a specified vault folder. Key Features: - Filter by file extension or name regex. - Provides a formatted tree view of the directory. obsidian_manage_frontmatter Description: Atomically manages a note's YAML frontmatter. Key Features: - `get`, `set`, or `delete` frontmatter keys. - Avoids rewriting the entire file for metadata changes. obsidian_manage_tags Description: Adds, removes, or lists tags for a note. Key Features: - Manages tags in both YAML frontmatter and inline content. obsidian_delete_note Description: Permanently deletes a specified note from the vault. Key Features: - Case-insensitive path fallback for safety. ``` -------------------------------- ### Obsidian MCP Server Environment Variables Reference Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/README.md Comprehensive list of environment variables used to configure the obsidian-mcp-server. These variables are typically set within the MCP client's configuration file (e.g., `cline_mcp_settings.json`). It includes details on required variables, default values, and specific conditions for their necessity. ```APIDOC OBSIDIAN_API_KEY Description: API Key from the Obsidian Local REST API plugin. Required: Yes Default: undefined OBSIDIAN_BASE_URL Description: Base URL of your Obsidian Local REST API. Required: Yes Default: http://127.0.0.1:27123 MCP_TRANSPORT_TYPE Description: Server transport: `stdio` or `http`. Required: No Default: stdio MCP_HTTP_PORT Description: Port for the HTTP server. Required: No Default: 3010 MCP_HTTP_HOST Description: Host for the HTTP server. Required: No Default: 127.0.0.1 MCP_ALLOWED_ORIGINS Description: Comma-separated origins for CORS. Set for production. Required: No Default: (none) MCP_AUTH_MODE Description: Authentication strategy: `jwt` or `oauth`. Required: No Default: (none) MCP_AUTH_SECRET_KEY Description: 32+ char secret for JWT. Required: Yes (if `jwt`) Default: undefined OAUTH_ISSUER_URL Description: URL of the OAuth 2.1 issuer. Required: Yes (if `oauth`) Default: undefined OAUTH_AUDIENCE Description: Audience claim for OAuth tokens. Required: Yes (if `oauth`) Default: undefined OAUTH_JWKS_URI Description: URI for the JSON Web Key Set (optional, derived from issuer if omitted). Required: No Default: (derived) MCP_LOG_LEVEL Description: Logging level (`debug`, `info`, `error`, etc.). Required: No Default: info OBSIDIAN_VERIFY_SSL Description: Set to `false` to disable SSL verification. Required: No Default: true OBSIDIAN_ENABLE_CACHE Description: Set to `true` to enable the in-memory vault cache. Required: No Default: true OBSIDIAN_CACHE_REFRESH_INTERVAL_MIN Description: Refresh interval for the vault cache in minutes. Required: No Default: 10 ``` -------------------------------- ### Open File in Obsidian Application Interface Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md Opens a specified file in the Obsidian application interface. Creates the file if it doesn't exist. ```APIDOC obsidian_open_file(filePath: string, newLeaf: boolean = false) - Description: Opens a specified file in the Obsidian application interface. Creates the file if it doesn't exist. - Parameters: - filePath (string, required): Vault-relative path to the file to open. - newLeaf (boolean, optional, default: false): If true, opens the file in a new editor tab (leaf). - Returns: Success confirmation. ``` -------------------------------- ### List Files and Directories in Obsidian Vault Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md Lists files and directories within a specified folder in the Obsidian vault. It can list contents from the vault root. ```APIDOC obsidian_list_files Description: Lists files and directories within a specified folder in the vault. Parameters: dirPath (string, required): Vault-relative path to the directory. Use an empty string "" or / for the vault root. Returns: An array of strings, where each string is a file or directory name (directories end with /). ``` -------------------------------- ### Obsidian Vault Cache Service Configuration Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/README.md This section details the environment variables used to configure the in-memory vault cache service. The cache enhances performance and resilience by storing file content and metadata, with options to enable/disable it and set the refresh interval. ```APIDOC OBSIDIAN_ENABLE_CACHE - Type: boolean - Default: true - Description: Set to 'true' to enable the cache service, or 'false' to disable it. OBSIDIAN_CACHE_REFRESH_INTERVAL_MIN - Type: number (minutes) - Default: 10 - Description: Defines the interval in minutes for the periodic background refresh of the cache. Only new or modified files are fetched during a refresh. ``` -------------------------------- ### Execute Obsidian Application Command by ID Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md Executes a registered Obsidian command using its unique ID. ```APIDOC obsidian_execute_command(commandId: string) - Description: Executes a registered Obsidian command using its unique ID. - Parameters: - commandId (string, required): The ID of the command to execute (e.g., "app:go-back", "editor:toggle-bold"). - Returns: Success confirmation. ``` -------------------------------- ### Manage Obsidian Note Frontmatter Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md This tool allows for reading, adding, updating, or removing specific keys from a note's YAML frontmatter. It provides a robust and reliable method for managing metadata fields programmatically, such as status or due dates, without needing to parse and rewrite the entire file content. It is significantly more reliable than text-based search and replace operations. ```APIDOC Tool Name: obsidian_manage_frontmatter Purpose: To read, add, update, or remove specific keys from a note's YAML frontmatter without having to parse and rewrite the entire file content. Input Schema: filePath: z.string() - Path to the target note. operation: z.enum(['get', 'set', 'delete']) - The action to perform. key: z.string() - The frontmatter key to target (e.g., "status"). value: z.any().optional() - The value to set for the key (required for 'set'). Output: { success: true, message: "...", value: ... } (returns the value for 'get', or the updated frontmatter). ``` -------------------------------- ### Manage Obsidian Note Tags Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md This tool facilitates adding or removing tags from an Obsidian note. Its logic intelligently handles tags whether they are defined in the frontmatter (e.g., `tags: [tag1, tag2]`) or inline within the note content (e.g., `#tag3`). This provides a semantic way for agents to categorize notes, aligning with core Obsidian workflows, and can be used as part of larger task automation. ```APIDOC Tool Name: obsidian_manage_tags Purpose: To add or remove tags from a note. The tool's logic handles tags in both the frontmatter (`tags: [tag1, tag2]`) and inline (`#tag3`). Input Schema: filePath: z.string() - Path to the target note. operation: z.enum(['add', 'remove', 'list']) - The action to perform. tags: z.array(z.string()) - An array of tags to add or remove (without the '#'). Output: { success: true, message: "...", currentTags: ["tag1", "tag2", "tag3"] } ``` -------------------------------- ### Retrieve Tags from Obsidian Vault YAML Frontmatter Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md Retrieves all tags defined in the YAML frontmatter of markdown files within your Obsidian vault, along with their usage counts and associated file paths. Optionally, limit the search to a specific folder. ```APIDOC obsidian_get_tags(path: string = optional) - Description: Retrieves all tags defined in the YAML frontmatter of markdown files within your Obsidian vault, along with their usage counts and associated file paths. Optionally, limit the search to a specific folder. - Parameters: - path (string, optional): Folder path (relative to vault root) to restrict the tag search. - Returns: An object mapping tags to their counts and associated file paths. ``` -------------------------------- ### Retrieve Properties from Obsidian Note YAML Frontmatter Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md Retrieves properties (like title, tags, status) from the YAML frontmatter of a specified Obsidian note. Returns all defined properties, including any custom fields. ```APIDOC obsidian_get_properties(filepath: string) - Description: Retrieves properties (like title, tags, status) from the YAML frontmatter of a specified Obsidian note. Returns all defined properties, including any custom fields. - Parameters: - filepath (string, required): Path to the note file (relative to vault root). - Returns: An object containing all frontmatter key-value pairs. ``` -------------------------------- ### Retrieve Content of Obsidian Periodic Note Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md Retrieves the content of a periodic note (e.g., daily, weekly). ```APIDOC obsidian_get_periodic_note(period: enum, format: enum = 'markdown') - Description: Retrieves the content of a periodic note (e.g., daily, weekly). - Parameters: - period (enum: 'daily' | 'weekly' | 'monthly' | 'quarterly' | 'yearly', required): The type of periodic note to retrieve. - format (enum: 'markdown' | 'json', optional, default: 'markdown'). - Returns: The periodic note's content as a string or a `NoteJson` object. ``` -------------------------------- ### Read File Content from Obsidian Vault Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md Retrieves the content of a specified file within an Obsidian vault, supporting markdown or JSON formats. The JSON format includes frontmatter and metadata. ```APIDOC obsidian_read_file Description: Retrieves the content of a specified file within the Obsidian vault. Parameters: filePath (string, required): Vault-relative path to the file. format (enum: 'markdown' | 'json', optional, default: 'markdown'): The desired format for the returned content. 'json' returns a NoteJson object including frontmatter and metadata. Returns: The file content as a string (markdown) or a NoteJson object. ``` -------------------------------- ### Check Obsidian Local REST API Plugin Status Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md Checks the connection status and authentication validity of the Obsidian Local REST API plugin. ```APIDOC obsidian_check_status() - Description: Checks the connection status and authentication validity of the Obsidian Local REST API plugin. - Parameters: None. - Returns: An `ApiStatusResponse` object containing authentication status, service name, and version information. ``` -------------------------------- ### Perform Global Search in Obsidian Vault Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md Performs text search across Obsidian vault content. This operation supports advanced server-side filtering capabilities like regex, wildcards, and date-based filtering for file modification times. ```APIDOC obsidian_global_search Description: Performs text search across vault content, with server-side support for regex, wildcards, and date filtering. Parameters: query (string, required): The text string or regex pattern to search for. contextLength (number, optional, default: 100): The number of characters surrounding each match to include as context. modified_since (string, optional): Filter for files modified _after_ this date/time (e.g., '2 weeks ago', '2024-01-15', 'yesterday'). Parsed by dateParser utility. modified_until (string, optional): Filter for files modified _before_ this date/time (e.g., 'today', '2024-03-20 17:00'). Parsed by dateParser utility. Returns: An array of search results (structure TBD, likely similar to SimpleSearchResult but potentially filtered further based on implementation). Note: Requires custom server-side implementation for advanced filtering (regex, dates) as the underlying simple API endpoint likely doesn't support them directly. May involve listing files, reading content, and applying filters in the MCP server. ``` -------------------------------- ### Perform Complex Search with Dataview DQL or JsonLogic in Obsidian API Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md Performs a complex search using Dataview DQL or JsonLogic. Advanced filtering (regex, dates) depends on the capabilities of the chosen query language. ```APIDOC obsidian_json_search(query: string | object, contentType: enum) - Description: Performs a complex search using Dataview DQL or JsonLogic. Advanced filtering (regex, dates) depends on the capabilities of the chosen query language. - Parameters: - query (string | object, required): The query string (for DQL) or JSON object (for JsonLogic). - contentType (enum: 'application/vnd.olrapi.dataview.dql+txt' | 'application/vnd.olrapi.jsonlogic+json', required): Specifies the format of the `query` parameter. - Returns: An array of `ComplexSearchResult` objects. ``` -------------------------------- ### Retrieve Content of Active File in Obsidian Editor Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md Retrieves the content of the currently active file in the Obsidian editor. ```APIDOC obsidian_get_active_file(format: enum = 'markdown') - Description: Retrieves the content of the currently active file in the Obsidian editor. - Parameters: - format (enum: 'markdown' | 'json', optional, default: 'markdown'). - Returns: The active file's content as a string or a `NoteJson` object. ``` -------------------------------- ### Update Obsidian File Content Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md Modifies an Obsidian note by appending, prepending, overwriting, or applying granular patches relative to internal structures. It can create the target file if it doesn't exist and supports various targeting methods (file path, active file, periodic note). ```APIDOC obsidian_update_file Description: Modifies the content of an Obsidian note (specified by path, the active file, or a periodic note) by appending, prepending, or overwriting (whole-file operations) OR applying granular patches relative to internal structures (patch operations). Can create the target if it doesn't exist. Required Parameters: targetType (enum: 'filePath' | 'activeFile' | 'periodicNote'): Specifies the type of target note. content (string | object): The content to use for the modification (string for whole-file, string or object for patch). modificationType (enum: 'wholeFile' | 'patch'): Specifies whether to perform a whole-file operation or a granular patch. Optional Parameters: targetIdentifier (string): Required if targetType is 'filePath' (provide vault-relative path) or 'periodicNote' (provide period like 'daily', 'weekly'). Not used for 'activeFile'. Parameters for modificationType: 'wholeFile': wholeFileMode (enum: 'append' | 'prepend' | 'overwrite', required): The specific whole-file operation. createIfNeeded (boolean, optional, default: true): If true, creates the target file/note if it doesn't exist before applying the modification. overwriteIfExists (boolean, optional, default: false): Only relevant for wholeFileMode: 'overwrite'. If true, allows overwriting an existing file. If false (default) and the file exists when mode is 'overwrite', the operation will fail. Parameters for modificationType: 'patch': patchOperation (enum: 'append' | 'prepend' | 'replace', required): The type of patch operation relative to the target. patchTargetType (enum: 'heading' | 'block' | 'frontmatter', required): The type of internal structure to target. patchTarget (string, required): The specific heading text, block ID, or frontmatter key to target. patchTargetDelimiter (string, optional): Delimiter for nested headings (default '::'). patchTrimTargetWhitespace (boolean, optional, default: false): Whether to trim whitespace around the patch target. patchCreateTargetIfMissing (boolean, optional, default: false): Whether to create the target (e.g., heading, frontmatter key) if it's missing before patching. Returns: Success confirmation. ``` -------------------------------- ### Update Properties in Obsidian Note YAML Frontmatter Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md Updates properties within the YAML frontmatter of a specified Obsidian note. By default, array properties (like tags) are merged; use the 'replace' option to overwrite them instead. Handles custom fields. ```APIDOC obsidian_update_properties(filepath: string, properties: object, replace: boolean = false) - Description: Updates properties within the YAML frontmatter of a specified Obsidian note. By default, array properties (like tags) are merged; use the 'replace' option to overwrite them instead. Handles custom fields. - Parameters: - filepath (string, required): Path to the note file (relative to vault root). - properties (object, required): Key-value pairs of properties to update. - replace (boolean, optional, default: false): If true, array properties will be completely replaced instead of merged. - Returns: Success confirmation. ``` -------------------------------- ### Delete Currently Active File in Obsidian Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md Deletes the currently active file in Obsidian. ```APIDOC obsidian_delete_active_file() - Description: Deletes the currently active file in Obsidian. - Parameters: None. - Returns: Success confirmation. ``` -------------------------------- ### Delete File from Obsidian Vault Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md Deletes a specified file from the Obsidian vault permanently. ```APIDOC obsidian_delete_file Description: Deletes a specified file from the vault. Parameters: filePath (string, required): Vault-relative path to the file to delete. Returns: Success confirmation. ``` -------------------------------- ### Delete Obsidian Periodic Note Source: https://github.com/cyanheads/obsidian-mcp-server/blob/main/docs/obsidian_mcp_tools_spec.md Deletes a specified periodic note. ```APIDOC obsidian_delete_periodic_note(period: enum) - Description: Deletes a specified periodic note. - Parameters: - period (enum: 'daily' | 'weekly' | 'monthly' | 'quarterly' | 'yearly', required): The type of periodic note to delete. - Returns: Success confirmation. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.