001-obsidian-mcp-bundle #1
Reference in New Issue
Block a user
Delete Branch "001-obsidian-mcp-bundle"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First round of features based on the obsidian CLI.
Added complete inputSchema definition for the obsidian_search tool with all parameters matching the Obsidian CLI specification: Parameters (per 'obsidian search help'): - query (string, required): Search query text - path (string, optional): Limit search to folder path - limit (number, optional): Maximum number of results - total (boolean, optional): Return match count instead of files - case (boolean, optional): Case sensitive search - format (enum, optional): Output format (text|json, default: text) The inputSchema is now properly exposed via tools/list, enabling: - Better parameter documentation in MCP clients - Automatic parameter validation - Type hints in Claude Desktop - Improved developer experience Previously the schema was empty { properties: {} }, now it fully documents all available parameters with types and descriptions. Files changed: - src/tools/search.ts: Added complete inputSchema definition Build: ✅ 0 errors Validation: ✅ Manifest passes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>Fixed parameter quoting in file operations and search tools to handle filenames and values containing spaces correctly. Root Cause: - Obsidian CLI requires quoting values with spaces: name="My Note" - Previous implementation used unquoted format: name=My Note - Shell would split on spaces, breaking multi-word filenames Solution: 1. Created formatParam() helper in src/utils/cli-helpers.ts - Always quotes parameter values: param="value" - Handles spaces and special characters safely 2. Updated file-operations.ts (8 tools): - All file/path/content/name parameters now quoted - create, read, append, prepend, delete, move, rename, open 3. Updated search.ts (1 tool): - query, path, format, limit parameters now quoted - Fixes searches with multi-word queries Changes: - Before: cmdArgs.push(\`file=${name}\`) - After: cmdArgs.push(formatParam('file', name)) Files changed: - src/utils/cli-helpers.ts (new): formatParam() and buildCmdArgs() helpers - src/tools/file-operations.ts: Use formatParam() for all parameters - src/tools/search.ts: Use formatParam() for all parameters Impact: - File operations now work with multi-word filenames - Search queries with spaces now work correctly - Content parameters with newlines/special chars handled safely Known Issue: - links.ts, tags-aliases.ts, properties.ts still need similar fixes - These tools have additional structural issues (wrong command names) - Will be addressed in follow-up commit Build: 0 errors Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>Fixed obsidian_list_properties and obsidian_get_property_count tools to properly expose their input parameters in the tools/list response. Changes: - obsidian_list_properties: Added 8 parameters (file, path, name, total, sort, counts, format, active) based on 'obsidian help properties' - obsidian_get_property_count: Added required 'name' parameter - Fixed command names: 'property' → 'properties' (correct command) - Added formatParam() for parameter quoting - Changed parameter format to match Obsidian CLI: param=value Before: Empty properties: {} meant tools appeared in list but with no documented parameters for MCP clients. After: Full parameter schemas with descriptions, types, and constraints properly exposed via tools/list handler. Build: ✅ 0 TypeScript errors Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>Fixed all remaining tools in links.ts and tags-aliases.ts to properly expose their input parameters in the tools/list response, matching the pattern used in file-operations.ts and search.ts. Links.ts (5 tools): - obsidian_get_backlinks: Added 5 params (file, path, counts, total, format) - obsidian_list_outgoing_links: Added 3 params (file, path, total) - obsidian_list_unresolved_links: Added 4 params (total, counts, verbose, format) - obsidian_list_deadends: Added 2 params (total, all) - obsidian_list_orphans: Added 2 params (total, all) Tags-Aliases.ts (4 tools): - obsidian_list_tags: Added 7 params (file, path, total, counts, sort, format, active) - obsidian_search_by_tag: Added 3 params (name required, total, verbose) * Renamed from obsidian_get_tag_info for consistency - obsidian_get_tag_count: Added 1 param (name required) - obsidian_list_aliases: Added 5 params (file, path, total, verbose, active) All parameters verified against 'obsidian help <command>' output. Changes to manifest.json: - Updated tool name: obsidian_get_tag_info → obsidian_search_by_tag Before: Empty properties: {} on 9 tools After: Full parameter schemas with types, descriptions, and required fields Build: ✅ 0 TypeScript errors Total tools with complete schemas: 28/28 ✅ Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>