According to the Obsidian MCP that I'm running, run the script below. At the end, list what worked and what didn't work. If you understand that there are opportunities for improvement, list them too. Don't stop the script if any error happens.
Testing Vault Tools
Tools: list_vaults, set_active_vault, register_vault
Note: When the MCP server starts, the vault specified in the command line is automatically registered as "default" and set as active. You don't need to register it again.
Test Vaults
The following vaults are available for testing:
- Primary vault (default):
/Users/diegorv/MyFiles/vault-teste - Secondary vault:
/Users/diegorv/MyFiles/vault-teste-diferente
Prerequisites
Before running these tests:
- Ensure MCP server is running: The Obsidian MCP server must be active and connected
- Have at least one valid Obsidian vault: You should have an Obsidian vault set up
- Know your vault path(s): Note the absolute path to your vault(s)
- Verify permissions: Ensure you have read/write permissions to vault directories
- For advanced tests: You may need to create additional vault directories
Test 1: List Configured Vaults
List all configured Obsidian vaultsExpected: Returns the "default" vault (configured at startup) as active.
Test 2: Verify Vault is Active
List all vaults and confirm which one is currently activeExpected: Shows the default vault as active with its path.
Test 3: Error Handling - Invalid Path
Try to register a vault with an invalid path that doesn't exist:
register_vault with name "invalid-test" at path "/invalid/path/that/does/not/exist"Expected: Should return error message "Directory does not exist: /invalid/path/that/does/not/exist"
This test validates that the system properly checks path existence before registering.
Test 4: Path Validation
Test various path formats to understand what's supported:
1. Try registering with an absolute path: /Users/diegorv/MyFiles/vault-teste-diferente
2. Try with a path containing spaces: "/Users/diegorv/My Vault Test"
3. Try with a relative path (if supported): ~/vault-testExpected:
- Absolute paths should work (if directory exists)
- Paths with spaces should work if properly quoted
- Note which path formats are accepted/rejected
Test 5: Register Additional Vault
Uses the secondary test vault
Register the secondary vault:
- Name: "secondary"
- Path: /Users/diegorv/MyFiles/vault-teste-diferenteExpected:
- Confirms the new vault was registered
- Default vault remains active
- list_vaults shows both vaults
Test 6: Switch Between Vaults
Requires multiple vaults registered (requires Test 5)
Set the vault "secondary" as the active vaultExpected:
- Confirms the active vault was changed
- Subsequent operations will use the "secondary" vault
Test 7: Verify Vault Switch
Requires multiple vaults registered
After switching vaults:
1. List all vaults again
2. Verify that "secondary" is now marked as active
3. Try creating a note to confirm operations use the new vaultExpected: Note is created in the secondary vault, not the default one.
Test 8: Switch Back to Default
Set the vault "default" as the active vault againExpected: Default vault becomes active again.
Test 9: Cleanup (Optional)
After testing with multiple vaults:
1. Switch back to the "default" vault
2. Note: There is currently no unregister_vault tool
3. To remove registered vaults, restart the MCP serverExpected: After restart, only the "default" vault is registered.
Quick Verification Test
Verify the Obsidian MCP connection:
1. List all configured vaults
2. Confirm which vault is active
3. Show the vault pathExpected:
- Connection is working
- At least one vault is listed
- Active vault is clearly identified with its path
Troubleshooting
Problem: "Directory does not exist" error
Solution:
- Verify the path exists and is an absolute path
- Check spelling and ensure no typos in the path
- On macOS/Linux, expand
~to full path (e.g.,/Users/yourname/) - Ensure you have permissions to access the directory
Problem: Cannot switch vaults
Solution:
- Ensure the vault is registered first with
register_vault - Use
list_vaultsto see all registered vault names - Use the exact vault name (case-sensitive)
Problem: Changes not reflecting
Solution:
- Check if the correct vault is active with
list_vaults - Verify you're looking at the correct vault directory
- Ensure the MCP server hasn't been restarted (loses non-default registrations)
Problem: Operations fail after switching vaults
Solution:
- Verify the target vault exists and is a valid Obsidian vault
- Check if the vault has
.obsidianfolder - Ensure you have read/write permissions
Problem: Lost secondary vault after restart
Solution:
- This is expected behavior - only the default vault persists
- You need to re-register secondary vaults after each restart
- Consider using the default vault for primary operations
Future Improvements
The following improvements could enhance the vault management system:
1. Unregister Vault Tool
Current limitation: No way to remove registered vaults without restarting
Suggested: Add unregister_vault tool
Tool: unregister_vault
Parameters:
{
"name": "vault-name"
}2. Enhanced Error Messages
Current: Basic error messages
{"success": false, "error": "Directory does not exist: /path"}Suggested: More helpful error responses
{
"success": false,
"error": "Directory does not exist: /path",
"suggestion": "Please create the directory first or check the path",
"errorCode": "VAULT_PATH_NOT_FOUND"
}3. Vault Validation
Suggested: Verify if directory is actually an Obsidian vault
- Check for
.obsidian/folder - Warn if it appears not to be a valid Obsidian vault
- Optionally initialize a new vault if it's an empty directory
4. Auto-discovery Tool
Suggested: Add discover_vaults tool to automatically find Obsidian vaults
Tool: discover_vaults
Parameters:
{
"searchPaths": [
"~/Documents/Obsidian",
"~/Obsidian",
"/custom/path"
]
}5. Vault Information Tool
Suggested: Get detailed information about a vault
Tool: get_vault_info
Parameters:
{
"name": "vault-name"
}
Returns:
- Number of notes
- Size on disk
- Last modified date
- Obsidian version/config info6. Persistent Vault Registry
Current limitation: Secondary vaults lost on restart
Suggested: Option to persist vault registrations to a config file
- Automatically re-register known vaults on startup
- User can manage persistent vault list
Test Results Template
Use this template to document your test results:
📊 VAULT MANAGEMENT TEST RESULTS
Date: [DATE]
Tester: [NAME]
Test Vaults:
- Primary: /Users/diegorv/MyFiles/vault-teste
- Secondary: /Users/diegorv/MyFiles/vault-teste-diferente
| # | Test | Status | Notes |
|---|------|--------|-------|
| 1 | List Configured Vaults | ✅/❌ | |
| 2 | Verify Vault is Active | ✅/❌ | |
| 3 | Error Handling - Invalid Path | ✅/❌ | |
| 4 | Path Validation | ✅/❌ | |
| 5 | Register Additional Vault | ✅/❌ | |
| 6 | Switch Between Vaults | ✅/❌ | |
| 7 | Verify Vault Switch | ✅/❌ | |
| 8 | Switch Back to Default | ✅/❌ | |
| 9 | Cleanup | ✅/❌ | |
| - | Quick Verification | ✅/❌ | |
Overall Status: [PASSED/FAILED/PARTIAL]
Key Issues Found: [DESCRIPTION]
Suggestions: [YOUR SUGGESTIONS]