mirror of
https://github.com/hanzoai/mcp.git
synced 2026-10-15 12:30:12 +00:00
🎨 **Tool Palette System** - Created palette system for organizing development tools by ecosystem - Pre-defined palettes: Python (Guido), Ruby (Matz), JavaScript, Go, Rust, DevOps, Full Stack, Minimal - `palette` tool to list, activate, and manage tool sets - Environment variables applied from active palette - Keeps MCP interface clean while supporting specialized workflows 🔧 **Unified Process Tools with OO Design** - Refactored all process execution to use clean base class hierarchy - `BaseProcessTool`, `BaseBinaryTool`, `BaseScriptTool` for consistent interface - Unified `bash`, `npx`, `uvx` tools with action-based approach (run/background) - `process` tool for managing background processes - All tools use same execution pipeline internally 🐚 **Smart Shell Detection** - Shell tool now detects user's preferred shell from $SHELL environment - Automatically uses zsh if .zshrc exists (perfect for your setup\!) - Falls back to bash if no special configuration found - All zsh aliases, functions, and configurations now available in MCP 🚀 **Development Mode with Hot Reload** - Added `--dev` flag to hanzo-mcp CLI for development mode - File watching with automatic reload detection using watchdog - `hanzo-mcp-dev` command for dedicated dev server - Watches Python files and config changes - Debounced reloading to prevent spam 🛠️ **New Tools Added** - `open`: Opens files/URLs in default application (platform-aware) - `watch`: Monitors files/directories for changes with pattern matching - `diff`: Compares files with unified/context diff formats - `config`: Git-style configuration management 📚 **Documentation & Infrastructure** - Comprehensive Sphinx documentation with black theme - Automated deployment to mcp.hanzo.ai via Cloudflare Pages - GitHub Actions workflow for docs deployment - 25+ documentation pages organized by category ⚙️ **Configuration Improvements** - Tool enable/disable system with palette override - Per-project vs global indexing configuration - Environment variable management through palettes - Clean separation of concerns in tool registration This release provides a much cleaner, more extensible architecture while maintaining backward compatibility. The palette system makes it easy to switch between development environments, and the unified process tools eliminate code duplication while providing consistent behavior. Co-authored-by: Hanzo Dev <[email protected]>
Filesystem Tool Tests
This directory contains tests for the filesystem tools in the Hanzo MCP project.
Test Files
test_fs_tools.py: Tests for the refactored filesystem toolstest_file_operations.py: Tests for various file operationstest_write_file.py: Comprehensive tests for the write file tool
Write File Tool Testing
The test_write_file.py file contains comprehensive tests for the write file tool, including:
Success Cases
- Writing files with standard content
- Creating nested directories
- Writing files with Unicode content
- Overwriting existing files
- Writing large files
Error Cases
- Missing path parameter
- Empty path parameter
- Missing content parameter
- Path not allowed
- Parent directory not allowed
- Write permission issues
- Encoding errors
- I/O errors
Running Tests
To run all filesystem tests:
make test TEST_DIR=tests/test_filesystem
To run a specific test file:
make test TEST_DIR=tests/test_filesystem/test_write_file.py
Adding New Tests
When adding new tests for filesystem tools, follow these guidelines:
- Use appropriate fixtures for setup and teardown
- Mock external dependencies and tool context
- Test both success and error paths
- Verify file content and filesystem state after operations
- Clean up temporary files after tests
- Add tests for various edge cases (permissions, encoding, large files, etc.)
Error Handling
The write_file tool has been enhanced with improved error handling:
- Error categorization: Different types of errors are caught and handled appropriately
- Detailed error messages: Error messages include specific information about what went wrong
- Logging: All errors are logged with appropriate severity levels
- Error propagation: Errors are properly returned to the client
Debug Logging
To enable debug logging during tests:
make test TEST_DIR=tests/test_filesystem LOG_LEVEL=DEBUG
This will provide detailed logs of the test execution, including input parameters, error conditions, and results.