feat: add optional features for large vaults and SSL certificate support#97
Open
kevincormier-toast wants to merge 5 commits intoMarkusPfundstein:mainfrom
Open
feat: add optional features for large vaults and SSL certificate support#97kevincormier-toast wants to merge 5 commits intoMarkusPfundstein:mainfrom
kevincormier-toast wants to merge 5 commits intoMarkusPfundstein:mainfrom
Conversation
Enhanced parameter descriptions for obsidian_patch_content to address two recurring issues that caused document corruption: 1. **target parameter (heading paths):** - Added explicit requirement to start with h1 (top-level) heading - Emphasized complete path from h1 down to target with '::' separator - Included WRONG/CORRECT examples showing common mistakes - Previously: agents would skip h1 or use incomplete paths 2. **content parameter (trailing newlines):** - Made trailing '\n' MANDATORY to prevent next heading from breaking - Clarified do NOT include heading markup when using replace operation - Added multiple examples showing wrong (no newline) vs correct patterns - Previously: missing newlines caused "content### Next Heading" corruption These detailed descriptions embed correctness rules directly in the tool interface, reducing need for external workaround documentation. Tested with fresh agent contexts - achieved 100% correct usage on first try.
Adds opt-in journaling tool (OBSIDIAN_ENABLE_JOURNALING=true) that
automates timestamps, formatting, and file organization for LLM
journaling workflows.
Key features:
- Structured metadata (type, alternatives, confidence)
- Date-based organization: work-logs/{YYYY-MM-DD}/{agent}.log
- Optional project-specific paths
- Multi-agent support
Implementation:
- New journaling.py module with core logic
- JournalEntryToolHandler in tools.py
- Environment variable feature flag in server.py
- Comprehensive JOURNALING.md guide with usage patterns
- Updated README with brief overview
Inspired by patterns in agent reflection research showing
performance improvements from articulating thinking.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
For large vaults, simple search can return excessive context that overwhelms token limits. This change allows users to disable the simple_search tool via OBSIDIAN_DISABLE_SIMPLE_SEARCH=true environment variable. - Add conditional check in server.py to skip SearchToolHandler registration - Document the new environment variable in README.md Configuration section - Tool is enabled by default, only disabled when explicitly configured 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Adds support for custom SSL certificates without requiring system keychain trust. Users can now provide certificates via: - Base64-encoded cert in OBSIDIAN_SSL_CERT_BASE64 environment variable - Path to cert file via OBSIDIAN_SSL_CERT_PATH environment variable Implementation details: - Checks OBSIDIAN_SSL_CERT_BASE64 first, decodes and writes to temp file - Falls back to OBSIDIAN_SSL_CERT_PATH, validates file exists - Maintains backward compatibility (verify=False when no cert provided) - Automatic cleanup of temporary certificate files via __del__ - Clear error messages for invalid configurations Documentation includes instructions for both options with examples. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Adds comprehensive debug logging to troubleshoot connection issues, SSL certificate problems, and configuration errors. Features: - OBSIDIAN_DEBUG_LOG environment variable for file-based logging - Logs environment configuration and SSL cert setup at startup - Logs all MCP tool calls with request/response details - Logs all API requests with URLs and verify_ssl settings - Enhanced SSL error handling with separate exception catching - Feature flag status logging (journaling, simple search) - Full stack traces for all errors Documentation: - Added README section for debug logging with examples - Added warning about using full paths instead of ~ for file paths - Explains why file-based logging is needed (stdio interference) This addresses issues where: - SSL certificate configuration errors were hard to diagnose - API connection failures had insufficient context - Environment variable conflicts (multiple sources) were unclear - Tilde expansion in paths failed silently 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature Additions: Enhanced Configuration and Debugging
Apologies for the Multi-Feature PR
I apologize for submitting multiple features in one PR - I realize this isn't ideal for review. I'm happy to split this into separate PRs if you prefer. Each feature is in its own commit which should make review easier, but please let me know if you'd like me to split them up.
Summary
This PR adds several optional features to improve usability for different vault sizes and deployment scenarios:
All features are opt-in via environment variables and maintain full backward compatibility.
1. Optional Journaling Tool (
62be425)Problem: Agents working on complex tasks benefit from articulating their thinking (rubber duck debugging), and cross-session continuity requires capturing the messy reality of development.
Solution: Adds
obsidian_journal_entrytool (gated behindOBSIDIAN_ENABLE_JOURNALING=true) that automates timestamps, formatting, and file organization for agent reflection logs.Documentation: Extensive guidance in
JOURNALING.mdon getting value from agent journaling.Why opt-in: Requires thoughtful prompting to be valuable - not useful for everyone.
2. Patch Content Tool Improvements (
46f983b)Problem: The
patch_contenttool's heading path requirements caused frequent errors - users weren't building full paths from h1 down.Solution: Enhanced tool description with explicit instructions and examples showing correct vs incorrect usage.
Impact: Reduces agent errors and user frustration with heading-based patches.
3. Disable Simple Search (
76bfe4c)Problem: For large vaults,
simple_searchreturns excessive context that can overwhelm token limits, making the tool unusable.Solution: Add
OBSIDIAN_DISABLE_SIMPLE_SEARCH=trueto hide the simple search tool while keeping complex search available.Why opt-in: Most users benefit from simple search - only large vaults need this.
4. Custom SSL Certificate Support (
bbf03a0)Problem: The Obsidian Local REST API uses self-signed certificates. Currently, users must either:
verify=False)Solution: Support custom SSL certificates without system keychain:
OBSIDIAN_SSL_CERT_BASE64- Base64-encoded certificate (recommended)OBSIDIAN_SSL_CERT_PATH- Path to certificate fileBenefits:
5. Debug Logging (
5f9f817)Problem: MCP servers use stdio for communication, making it extremely difficult to debug connection issues, SSL errors, or configuration problems.
Solution: Add
OBSIDIAN_DEBUG_LOG=/path/to/debug.logto write diagnostic information to a separate file:Why needed: This was essential for debugging the SSL certificate feature and helped identify a real issue where tilde expansion in paths failed silently.
Documentation: Added warning about using full paths instead of
~in configs.Testing
All features tested with:
python3 -m py_compile)Breaking Changes
None - all features are opt-in and maintain full backward compatibility.
Again, I apologize for the multi-feature PR. Please let me know if you'd like me to:
Thank you for maintaining this excellent MCP server!