Release v0.0.4 - Audit Trail & Tool Agent Improvements
π Overview
Version 0.0.4 introduces comprehensive audit trail capabilities and significant improvements to the tool agent for generating tool specifications from Astra DB tables.
β¨ New Features
Audit Trail System
- Automatic Audit Logging: Track all tool executions with detailed audit records stored in Astra DB
- Audit Table Management: Automatic creation and management of audit tables in Astra DB
- Comprehensive Audit Data: Capture tool executions with:
- Tool ID and run ID (UUID-based)
- Client identification
- Start and end timestamps
- Execution parameters and results
- Error tracking and status information
- Status codes and detailed messages
- Configurable Audit: Enable audit trail via
--auditflag orASTRA_DB_AUDIT_TABLE_NAMEenvironment variable - Partitioned Storage: Audit tables use efficient partitioning by tool ID and date for optimal query performance
Enhanced Tool Agent
- Improved Tool Specification Generation: Enhanced AI-powered tool specification generation from table schemas
- Better Prompt Engineering: New customizable prompt system for tool generation (
tool_agent_prompt.py) - Additional Instructions Support: Pass custom instructions to guide tool specification generation
- Prompt Export: Export and customize the prompts used for tool generation
- Enhanced Schema Analysis: Better understanding of partition keys, sorting keys, and indexed columns
- Smart Parameter Generation: Automatic generation of date range and numeric range parameters for indexed columns
π§ Improvements
- Database Layer Enhancements: Improved database operations with better error handling and logging
- Tool Execution Middleware: Enhanced middleware for tracking tool execution lifecycle
- Logging System: Improved logging with better context and structured information
- Documentation Updates: Comprehensive README updates with new features and usage examples
π¦ New Examples
- Airline Tool Example: New example tool specification generated by the tool agent (
examples/tools/airline_tool_by_agent.json) - Tool Agent Prompt Template: Example prompt file for tool specification generation (
examples/prompts/tool_agent_prompt.md) - Organized Examples: Better organization of example tools and configurations
π οΈ Technical Changes
- Added
audit.pymodule for audit table definitions - Enhanced
database.pywith audit trail setup and logging methods - Improved
run_tool.pymiddleware with audit integration - Enhanced
tool_agent.pywith better prompt handling and instructions - New
tool_agent_prompt.pymodule for prompt management - Updated logger configuration and utilities
π Configuration
To enable audit trail, set the following environment variable:
ASTRA_DB_AUDIT_TABLE_NAME=mcp_audit_trailAnd use the command-line flag:
uvx astra-mcp-server --auditπ Migration Notes
- When audit is enabled, the audit table is automatically created on first use
- No breaking changes to existing APIs or tool configurations
π Documentation
- Updated README with audit trail configuration details
π Bug Fixes
- Improved error handling in tool execution
- Better validation of tool parameters
- Enhanced logging for debugging