feat: implement User Story 2 - Search and Discovery (P2)

Implemented 12 new MCP tools for search and knowledge graph navigation:

Search Tools (2):
- obsidian_search: Content search with folder filtering and case sensitivity
- obsidian_search_with_context: Search with surrounding context lines

Link Tools (5):
- obsidian_get_backlinks: Show incoming links to a note
- obsidian_get_outgoing_links: Show outgoing links from a note
- obsidian_list_unresolved_links: Find broken wikilinks
- obsidian_list_deadends: Find notes with no outgoing links
- obsidian_list_orphans: Find notes with no incoming links

Tag & Alias Tools (3):
- obsidian_list_tags: List all tags with optional counts
- obsidian_get_tag_info: Detailed tag usage information
- obsidian_list_aliases: List note aliases

Property Discovery Tools (2):
- obsidian_list_properties: List all vault properties
- obsidian_get_property_count: Get property usage counts

New files created:
- src/tools/search.ts (2 tools)
- src/tools/links.ts (5 tools)
- src/tools/tags-aliases.ts (3 tools)
- src/tools/properties.ts (2 tools)

Updated:
- src/tools/index.ts: Register all new tool modules
- src/validation/schemas.ts: Enhanced searchSchema with new parameters
- manifest.json: Added 12 new tools to tools array (21 total)
- tasks.md: Marked T046-T063 complete (18 tasks)

Build:  0 errors
Validation:  Manifest passes
Total tools: 21 (9 US1 + 12 US2)
Tasks complete: 70/167 (41.9%)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-03-22 12:08:30 -05:00
parent edb03263ac
commit a978d70b3f
9 changed files with 583 additions and 21 deletions

View File

@@ -69,6 +69,54 @@
{
"name": "obsidian_get_file_info",
"description": "Get metadata and information about a note file. Specify either file name or path. Returns file size, dates, path, and other metadata."
},
{
"name": "obsidian_search",
"description": "Search for notes in the vault by content. Returns matching files with optional context snippets. Supports case-sensitive search and folder filtering."
},
{
"name": "obsidian_search_with_context",
"description": "Search for notes with surrounding context. Returns matching lines with context before and after the match for better understanding."
},
{
"name": "obsidian_get_backlinks",
"description": "Get all backlinks (incoming links) to a note. Shows which notes reference this note. Optionally include link counts."
},
{
"name": "obsidian_get_outgoing_links",
"description": "Get all outgoing links from a note. Shows which notes this note references. Useful for understanding note connections."
},
{
"name": "obsidian_list_unresolved_links",
"description": "List all unresolved (broken) wikilinks in the vault. Shows links pointing to notes that don't exist. Useful for finding content gaps."
},
{
"name": "obsidian_list_deadends",
"description": "List all dead-end notes (notes with no outgoing links). These notes don't connect to anything else in the vault."
},
{
"name": "obsidian_list_orphans",
"description": "List all orphan notes (notes with no incoming links/backlinks). These notes aren't referenced by any other notes."
},
{
"name": "obsidian_list_tags",
"description": "List all tags in the vault or in a specific note. Optionally include usage counts and sort by frequency or name."
},
{
"name": "obsidian_get_tag_info",
"description": "Get detailed information about a specific tag, including which notes use it and how many times."
},
{
"name": "obsidian_list_aliases",
"description": "List all aliases in the vault or for a specific note. Aliases are alternative names for notes."
},
{
"name": "obsidian_list_properties",
"description": "List all properties used in the vault. Shows property keys and optionally their types and usage counts."
},
{
"name": "obsidian_get_property_count",
"description": "Get the usage count for a specific property across the vault. Shows how many notes use this property."
}
]
}