# Changelog
## [1.1.0] - 2025-12-08
### Major Changes
- **Unified Tool Architecture**: Consolidated all 9 individual calculation tools into a single, intelligent `calculate` tool that automatically detects expression types
- **Enhanced User Experience**: The calculator now provides a streamlined interface with automatic expression type detection
### Added
- **Input Validation Model**: Added `CalculateInput` Pydantic model with comprehensive field validation
- **Response Format Options**: Added support for both Markdown (human-readable) and JSON (machine-readable) output formats
- **Tool Annotations**: Added MCP tool annotations for better client-side behavior hints
- **Character Limit Implementation**: Added configurable CHARACTER_LIMIT (25,000) with automatic truncation for large responses
- **Enhanced Documentation**: Comprehensive docstrings with examples, error handling, and usage guidelines
### Improvements
- **Pydantic v2 Migration**: Updated to use modern Pydantic v2 features with `model_config` and field validators
- **Better Error Messages**: Improved error handling with actionable, user-friendly error messages
- **AST Compatibility**: Fixed AST deprecation warnings for Python 3.14 compatibility
- **Code Quality**: Added module-level constants and improved code organization following MCP best practices
### Breaking Changes
- The 9 individual tools (`calculator_add`, `calculator_subtract`, etc.) have been removed and replaced with the unified `calculate` tool
- Tool response format has been enhanced to support both Markdown and JSON outputs
- Input validation is now more strict with clear error messages
### Usage Examples
```python
# Old way (removed)
calculator_add(numbers=[2, 3])
calculator_multiply(numbers=[4, 5])
# New way (unified)
calculate("2 + 3") # Returns 5
calculate("4 * 5") # Returns 20
calculate("2+3; 4*5") # Returns [5, 20] for batch calculation
```
## [1.0.0] - 2025-11-29
### Added
- Initial release of Calculator MCP Server
- Complete implementation of MCP v1.0 compliant mathematical calculation server
- Basic arithmetic operations: addition, subtraction, multiplication, division, power
- Advanced features: statistics, batch calculations, expression evaluation
- Linear equation solver with support for custom variables
- Mathematical constants and formulas resources
- Intelligent prompts for math problem solving
- AST-based security validation for expression evaluation
- Comprehensive error handling and input validation
- Docker support with multi-stage builds
- Complete CI/CD pipeline with automated testing
- Development environment setup scripts
- Comprehensive documentation and API reference
### Security Features
- Safe expression evaluation using AST parsing
- Input validation for all mathematical operations
- Protection against code injection attacks
- Division by zero protection
- Comprehensive error handling
### Performance
- Asynchronous architecture for high concurrency
- < 10ms average response time for basic operations
- Support for 100+ concurrent requests
- Optimized memory usage (< 100MB)
### Compatibility
- 100% MCP v1.0 compliant
- Compatible with Claude Desktop, VS Code MCP extension
- Support for Python 3.9-3.12
- Cross-platform support (Windows, macOS, Linux)
### Documentation
- Complete API documentation with examples
- Comprehensive README with installation and usage guides
- Contributing guidelines and development setup
- Security and performance specifications