Skip to content

v0.0.4

Latest

Choose a tag to compare

@smatiolids smatiolids released this 03 Nov 14:01
· 9 commits to main since this release

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 --audit flag or ASTRA_DB_AUDIT_TABLE_NAME environment 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.py module for audit table definitions
  • Enhanced database.py with audit trail setup and logging methods
  • Improved run_tool.py middleware with audit integration
  • Enhanced tool_agent.py with better prompt handling and instructions
  • New tool_agent_prompt.py module 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_trail

And 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