Private Readonly DANGEROUS_List of dangerous SQL keywords and patterns that should be blocked
Protected InternalInternal method that must be implemented by derived action classes. This is where the actual action logic should be implemented.
The action execution parameters including typed context
Promise resolving to the action result
Executes the action with the provided parameters.
The action execution parameters including context
Promise resolving to the action result
Private analyzeAnalyze query data using AI prompt
Private buildBuild detailed message with query results for agent consumption
Optional formattedData: stringOptional analysis: stringPrivate ensurePrivate formatPrivate formatCSVRowPrivate formatCSVValuePrivate generatePrivate getHelper to get numeric parameter value
Private getPrivate getHelper to get string parameter value
Private trimTrims columns in result set to maximum length Used for JSON format results to prevent verbose fields from overwhelming context
Array of result objects
Maximum length for string values
New array with trimmed values
Private validate
Action that executes read-only SQL SELECT queries for research purposes with security validation.
Security Features:
Performance Features:
Note: SQL syntax validation is handled by SQL Server during execution. This provides more accurate error messages than a JavaScript parser.
Example