snow-flow
Version:
Snow-Flow v3.2.0: Complete ServiceNow Enterprise Suite with 180+ MCP Tools. ATF Testing, Knowledge Management, Service Catalog, Change Management with CAB scheduling, Virtual Agent chatbots with NLU, Performance Analytics KPIs, Flow Designer automation, A
1,018 lines (1,017 loc) • 625 kB
JavaScript
#!/usr/bin/env node
"use strict";
/**
* ServiceNow Advanced Features MCP Server
*
* Provides 14 AI-powered tools for deep ServiceNow insights, automated documentation,
* and process mining capabilities that revolutionize ServiceNow management.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServiceNowAdvancedFeaturesMCP = void 0;
const base_mcp_server_js_1 = require("../base-mcp-server.js");
const snow_memory_manager_js_1 = require("../../utils/snow-memory-manager.js");
class ServiceNowAdvancedFeaturesMCP extends base_mcp_server_js_1.BaseMCPServer {
constructor() {
super({
name: 'servicenow-advanced-features',
version: '1.0.0',
description: 'Advanced AI-powered ServiceNow analysis and automation tools',
capabilities: {
tools: {}
}
});
this.batchQueue = new Map();
this.cacheManager = new Map();
this.memoryManager = snow_memory_manager_js_1.ServiceNowMemoryManager.getInstance();
}
setupTools() {
// Tool 1: Smart Batch API Operations
this.registerTool({
name: 'snow_batch_api',
description: 'Execute multiple ServiceNow operations in a single transaction with 80% reduction in API calls',
inputSchema: {
type: 'object',
properties: {
operations: {
type: 'array',
description: 'Array of operations to execute in batch',
items: {
type: 'object',
properties: {
operation: {
type: 'string',
enum: ['query', 'insert', 'update', 'delete'],
description: 'Type of operation'
},
table: {
type: 'string',
description: 'ServiceNow table name'
},
data: {
type: 'object',
description: 'Data for insert/update operations'
},
query: {
type: 'string',
description: 'Encoded query for query/update/delete operations'
},
fields: {
type: 'array',
items: { type: 'string' },
description: 'Fields to return for query operations'
},
limit: {
type: 'number',
description: 'Limit for query operations'
},
sys_id: {
type: 'string',
description: 'System ID for update/delete operations'
}
},
required: ['operation', 'table']
}
},
transactional: {
type: 'boolean',
default: true,
description: 'Execute all operations in a transaction (rollback on failure)'
},
parallel: {
type: 'boolean',
default: true,
description: 'Execute independent operations in parallel'
},
cache_results: {
type: 'boolean',
default: true,
description: 'Cache results for performance'
}
},
required: ['operations']
}
}, async (args) => await this.executeBatchApi(args));
// Tool 2: Table Relationship Mapping
this.registerTool({
name: 'snow_get_table_relationships',
description: 'Map all dependencies for a table including extensions, references, and common query patterns',
inputSchema: {
type: 'object',
properties: {
table: {
type: 'string',
description: 'Table name to analyze relationships for'
},
max_depth: {
type: 'number',
default: 3,
description: 'Maximum depth to traverse relationships (default: 3)'
},
include_extended_tables: {
type: 'boolean',
default: true,
description: 'Include tables that extend this table'
},
include_references: {
type: 'boolean',
default: true,
description: 'Include reference fields to other tables'
},
include_referenced_by: {
type: 'boolean',
default: true,
description: 'Include tables that reference this table'
},
include_query_patterns: {
type: 'boolean',
default: true,
description: 'Include common query patterns for the table'
},
visualize: {
type: 'boolean',
default: true,
description: 'Generate visual diagram of relationships'
}
},
required: ['table']
}
}, async (args) => await this.getTableRelationships(args));
// Tool 3: Query Performance Analyzer
this.registerTool({
name: 'snow_analyze_query',
description: 'Predict query performance, identify missing indexes, suggest optimizations, and provide risk scores',
inputSchema: {
type: 'object',
properties: {
query: {
type: 'string',
description: 'ServiceNow encoded query to analyze'
},
table: {
type: 'string',
description: 'Table name the query will run against'
},
expected_records: {
type: 'number',
description: 'Expected number of records (for performance estimation)'
},
check_indexes: {
type: 'boolean',
default: true,
description: 'Check for missing indexes'
},
suggest_alternatives: {
type: 'boolean',
default: true,
description: 'Suggest alternative query formulations'
},
analyze_joins: {
type: 'boolean',
default: true,
description: 'Analyze performance impact of dot-walked fields'
},
risk_assessment: {
type: 'boolean',
default: true,
description: 'Provide risk score and warnings'
}
},
required: ['query', 'table']
}
}, async (args) => await this.analyzeQueryPerformance(args));
// Tool 4: Field Usage Intelligence
this.registerTool({
name: 'snow_analyze_field_usage',
description: 'Discover which fields are actually used in queries, views, reports, and business rules to identify safe-to-deprecate fields',
inputSchema: {
type: 'object',
properties: {
table: {
type: 'string',
description: 'Table name to analyze field usage for'
},
analyze_queries: {
type: 'boolean',
default: true,
description: 'Analyze field usage in database queries'
},
analyze_views: {
type: 'boolean',
default: true,
description: 'Analyze field usage in list views and forms'
},
analyze_reports: {
type: 'boolean',
default: true,
description: 'Analyze field usage in reports and dashboards'
},
analyze_business_rules: {
type: 'boolean',
default: true,
description: 'Analyze field usage in business rules and scripts'
},
analyze_ui_policies: {
type: 'boolean',
default: true,
description: 'Analyze field usage in UI policies and client scripts'
},
analyze_workflows: {
type: 'boolean',
default: true,
description: 'Analyze field usage in workflows and flows'
},
include_custom_only: {
type: 'boolean',
default: false,
description: 'Only analyze custom fields (u_* fields)'
},
deprecation_analysis: {
type: 'boolean',
default: true,
description: 'Identify fields safe for deprecation'
},
usage_threshold_days: {
type: 'number',
default: 90,
description: 'Consider fields unused if not accessed in this many days'
}
},
required: ['table']
}
}, async (args) => await this.analyzeFieldUsage(args));
// Tool 5: Migration Helper
this.registerTool({
name: 'snow_create_migration_plan',
description: 'Create comprehensive migration plan for moving data between tables with field mapping and value transformation',
inputSchema: {
type: 'object',
properties: {
source_table: {
type: 'string',
description: 'Source table name to migrate data from'
},
target_table: {
type: 'string',
description: 'Target table name to migrate data to'
},
migration_type: {
type: 'string',
enum: ['custom_to_ootb', 'ootb_to_custom', 'table_merge', 'table_split', 'general'],
default: 'custom_to_ootb',
description: 'Type of migration (custom to out-of-box, etc.)'
},
field_mapping_strategy: {
type: 'string',
enum: ['automatic', 'manual', 'hybrid'],
default: 'hybrid',
description: 'Strategy for mapping fields between tables'
},
confidence_threshold: {
type: 'number',
default: 0.8,
description: 'Minimum confidence score for automatic field mapping (0.0-1.0)'
},
include_data_analysis: {
type: 'boolean',
default: true,
description: 'Analyze actual data values for better mapping'
},
generate_scripts: {
type: 'boolean',
default: true,
description: 'Generate migration scripts (Transform Maps, Import Sets)'
},
validate_constraints: {
type: 'boolean',
default: true,
description: 'Validate data constraints and business rules'
},
preserve_references: {
type: 'boolean',
default: true,
description: 'Maintain reference field relationships during migration'
},
batch_size: {
type: 'number',
default: 1000,
description: 'Number of records to process per batch'
}
},
required: ['source_table', 'target_table']
}
}, async (args) => await this.createMigrationPlan(args));
// Tool 6: Deep Table Analysis
this.registerTool({
name: 'snow_analyze_table_deep',
description: 'Perform comprehensive deep analysis of a ServiceNow table including structure, data quality, performance, security, and optimization recommendations',
inputSchema: {
type: 'object',
properties: {
table_name: {
type: 'string',
description: 'Name of the ServiceNow table to analyze'
},
analysis_scope: {
type: 'array',
items: {
type: 'string',
enum: ['structure', 'data_quality', 'performance', 'security', 'compliance', 'usage_patterns', 'dependencies', 'optimization']
},
description: 'Scope of analysis to perform (default: all)',
default: ['structure', 'data_quality', 'performance', 'security', 'usage_patterns', 'optimization']
},
include_sample_data: {
type: 'boolean',
description: 'Include sample data analysis (default: true)'
},
performance_period: {
type: 'string',
enum: ['1h', '24h', '7d', '30d'],
description: 'Period for performance analysis (default: 24h)',
default: '24h'
},
analyze_child_tables: {
type: 'boolean',
description: 'Include analysis of child tables (default: false)'
},
generate_recommendations: {
type: 'boolean',
description: 'Generate actionable optimization recommendations (default: true)'
},
security_level: {
type: 'string',
enum: ['basic', 'standard', 'comprehensive'],
description: 'Level of security analysis (default: standard)',
default: 'standard'
},
max_sample_records: {
type: 'number',
description: 'Maximum records to sample for data quality analysis (default: 1000)',
default: 1000
}
},
required: ['table_name']
}
}, async (args) => await this.analyzeTableDeep(args));
// Tool 7: Code Pattern Detector
this.registerTool({
name: 'snow_detect_code_patterns',
description: 'Detect anti-patterns, code smells, and optimization opportunities in ServiceNow scripts, business rules, and custom code with AI-powered analysis',
inputSchema: {
type: 'object',
properties: {
analysis_scope: {
type: 'array',
items: {
type: 'string',
enum: ['business_rules', 'client_scripts', 'script_includes', 'ui_scripts', 'workflows', 'flows', 'rest_apis', 'scheduled_jobs', 'transform_maps']
},
description: 'Types of code artifacts to analyze (default: all)',
default: ['business_rules', 'client_scripts', 'script_includes']
},
pattern_categories: {
type: 'array',
items: {
type: 'string',
enum: ['anti_patterns', 'performance', 'security', 'maintainability', 'best_practices', 'complexity', 'code_smells', 'technical_debt']
},
description: 'Categories of patterns to detect (default: all)',
default: ['anti_patterns', 'performance', 'security', 'maintainability']
},
table_filter: {
type: 'string',
description: 'Filter analysis to specific table (optional)'
},
severity_threshold: {
type: 'string',
enum: ['critical', 'high', 'medium', 'low'],
description: 'Minimum severity level to report (default: medium)',
default: 'medium'
},
include_recommendations: {
type: 'boolean',
description: 'Include specific refactoring recommendations (default: true)'
},
analyze_dependencies: {
type: 'boolean',
description: 'Analyze cross-script dependencies and impact (default: false)'
},
max_scripts: {
type: 'number',
description: 'Maximum number of scripts to analyze (default: 100)',
default: 100
},
generate_report: {
type: 'boolean',
description: 'Generate comprehensive analysis report (default: true)'
}
},
required: []
}
}, async (args) => await this.detectCodePatterns(args));
// Feature 8: Predictive Impact Analysis
this.registerTool({
name: 'snow_predict_change_impact',
description: 'Predictive Impact Analysis - Analyze potential impacts of changes across ServiceNow platform to prevent unintended consequences',
inputSchema: {
type: 'object',
properties: {
change_type: {
type: 'string',
enum: ['table_structure', 'business_rule', 'workflow', 'script_include', 'ui_policy', 'acl', 'field_change', 'integration'],
description: 'Type of change to analyze'
},
target_object: {
type: 'string',
description: 'Target object (table name, script name, etc.)'
},
change_details: {
type: 'object',
description: 'Specific change details',
properties: {
action: {
type: 'string',
enum: ['create', 'update', 'delete', 'rename'],
description: 'Action being performed'
},
field_changes: {
type: 'array',
items: { type: 'string' },
description: 'Fields being changed'
},
new_values: {
type: 'object',
description: 'New values being set'
},
scope: {
type: 'string',
enum: ['global', 'application', 'domain'],
description: 'Scope of the change'
}
}
},
include_dependencies: {
type: 'boolean',
default: true,
description: 'Include dependency analysis'
},
risk_threshold: {
type: 'string',
enum: ['low', 'medium', 'high', 'critical'],
default: 'medium',
description: 'Minimum risk level to report'
},
analysis_depth: {
type: 'string',
enum: ['basic', 'standard', 'deep'],
default: 'standard',
description: 'Depth of impact analysis'
}
},
required: ['change_type', 'target_object', 'change_details']
}
}, async (args) => await this.predictChangeImpact(args));
// Feature 9: Auto Documentation Generator
this.registerTool({
name: 'snow_generate_documentation',
description: 'Auto Documentation Generator - Automatically generate comprehensive documentation from code, flows, and system behavior without manual intervention',
inputSchema: {
type: 'object',
properties: {
documentation_scope: {
type: 'array',
items: {
type: 'string',
enum: ['tables', 'business_rules', 'workflows', 'flows', 'widgets', 'script_includes', 'integrations', 'apis', 'processes', 'architecture']
},
description: 'Scope of documentation to generate'
},
target_objects: {
type: 'array',
items: { type: 'string' },
description: 'Specific objects to document (optional - if not provided, all objects in scope will be documented)'
},
output_format: {
type: 'string',
enum: ['markdown', 'html', 'confluence', 'pdf', 'json', 'wiki'],
default: 'markdown',
description: 'Output format for documentation'
},
include_diagrams: {
type: 'boolean',
default: true,
description: 'Include system architecture and flow diagrams'
},
include_code_analysis: {
type: 'boolean',
default: true,
description: 'Include detailed code analysis and explanations'
},
include_usage_patterns: {
type: 'boolean',
default: true,
description: 'Include usage patterns and best practices'
},
include_dependencies: {
type: 'boolean',
default: true,
description: 'Include dependency mapping and relationships'
},
generate_api_docs: {
type: 'boolean',
default: true,
description: 'Generate API documentation for REST endpoints and integrations'
},
audience_level: {
type: 'string',
enum: ['technical', 'business', 'mixed'],
default: 'mixed',
description: 'Target audience level for documentation'
},
auto_update: {
type: 'boolean',
default: false,
description: 'Enable automatic documentation updates when code changes'
}
},
required: ['documentation_scope']
}
}, async (args) => await this.generateDocumentation(args));
// Feature 10: Intelligent Refactoring
this.registerTool({
name: 'snow_refactor_code',
description: 'Intelligent Refactoring - Automatically refactor ServiceNow code to improve quality, performance, and maintainability with AI-powered analysis',
inputSchema: {
type: 'object',
properties: {
refactoring_scope: {
type: 'array',
items: {
type: 'string',
enum: ['business_rules', 'client_scripts', 'script_includes', 'ui_scripts', 'workflows', 'flows', 'rest_apis', 'scheduled_jobs']
},
description: 'Scope of code to refactor'
},
target_objects: {
type: 'array',
items: { type: 'string' },
description: 'Specific objects to refactor (optional - if not provided, all objects in scope will be analyzed)'
},
refactoring_goals: {
type: 'array',
items: {
type: 'string',
enum: ['performance', 'maintainability', 'security', 'readability', 'best_practices', 'error_handling', 'complexity_reduction', 'code_reuse']
},
default: ['performance', 'maintainability', 'readability'],
description: 'Primary refactoring goals'
},
refactoring_intensity: {
type: 'string',
enum: ['conservative', 'moderate', 'aggressive'],
default: 'moderate',
description: 'Intensity of refactoring changes'
},
preserve_functionality: {
type: 'boolean',
default: true,
description: 'Ensure refactored code maintains exact same functionality'
},
generate_tests: {
type: 'boolean',
default: true,
description: 'Generate unit tests for refactored code'
},
create_backup: {
type: 'boolean',
default: true,
description: 'Create backup of original code before refactoring'
},
apply_changes: {
type: 'boolean',
default: false,
description: 'Apply refactoring changes directly to ServiceNow (default: preview only)'
},
include_documentation: {
type: 'boolean',
default: true,
description: 'Include updated documentation and comments'
},
validate_changes: {
type: 'boolean',
default: true,
description: 'Validate refactored code for syntax and logic errors'
}
},
required: ['refactoring_scope']
}
}, async (args) => await this.refactorCode(args));
// Feature 11: Process Mining Engine
this.registerTool({
name: 'snow_discover_process',
description: 'Process Mining Engine - Discover actual process flows by analyzing ServiceNow event logs, transactions, and user interactions to understand how processes really work',
inputSchema: {
type: 'object',
properties: {
process_scope: {
type: 'string',
enum: ['incident_management', 'change_management', 'service_requests', 'problem_management', 'asset_lifecycle', 'hr_processes', 'custom_processes', 'all_processes'],
description: 'Scope of process mining analysis'
},
analysis_period: {
type: 'string',
enum: ['1d', '7d', '30d', '90d', '6m', '1y'],
default: '30d',
description: 'Time period for process analysis'
},
tables_to_analyze: {
type: 'array',
items: { type: 'string' },
description: 'Specific tables to analyze for process discovery (optional - auto-detected if not provided)'
},
min_case_frequency: {
type: 'number',
default: 5,
description: 'Minimum number of cases required for a process variant to be included'
},
include_user_interactions: {
type: 'boolean',
default: true,
description: 'Include user interaction patterns in process discovery'
},
include_system_workflows: {
type: 'boolean',
default: true,
description: 'Include automated workflow and business rule activities'
},
include_approval_patterns: {
type: 'boolean',
default: true,
description: 'Analyze approval patterns and bottlenecks'
},
detect_deviations: {
type: 'boolean',
default: true,
description: 'Identify process deviations and exceptions'
},
generate_process_model: {
type: 'boolean',
default: true,
description: 'Generate BPMN-style process model visualization'
},
include_performance_metrics: {
type: 'boolean',
default: true,
description: 'Include timing and performance analysis'
},
identify_bottlenecks: {
type: 'boolean',
default: true,
description: 'Identify process bottlenecks and delays'
},
compliance_analysis: {
type: 'boolean',
default: false,
description: 'Analyze compliance with defined processes (requires reference process)'
},
reference_process_model: {
type: 'string',
description: 'Reference process model for compliance analysis (BPMN XML or process description)'
},
export_format: {
type: 'array',
items: {
type: 'string',
enum: ['json', 'csv', 'bpmn', 'html_report', 'process_map']
},
default: ['json', 'html_report'],
description: 'Output formats for discovered processes'
}
},
required: ['process_scope']
}
}, async (args) => await this.discoverProcess(args));
// Feature 12: Workflow Reality Analyzer
this.registerTool({
name: 'snow_analyze_workflow_execution',
description: 'Workflow Reality Analyzer - Compare actual workflow executions against designed workflows to identify gaps, inefficiencies, and optimization opportunities',
inputSchema: {
type: 'object',
properties: {
workflow_scope: {
type: 'string',
enum: ['specific_workflow', 'workflow_category', 'all_workflows', 'by_table', 'by_process'],
description: 'Scope of workflow analysis'
},
workflow_identifier: {
type: 'string',
description: 'Specific workflow name, sys_id, or category to analyze (required for specific_workflow and workflow_category scopes)'
},
table_name: {
type: 'string',
description: 'Table name for table-based workflow analysis (required for by_table scope)'
},
analysis_period: {
type: 'string',
enum: ['1d', '7d', '30d', '90d', '6m', '1y'],
default: '30d',
description: 'Time period for execution analysis'
},
include_design_comparison: {
type: 'boolean',
default: true,
description: 'Compare actual executions against workflow design'
},
include_performance_analysis: {
type: 'boolean',
default: true,
description: 'Analyze workflow performance metrics and bottlenecks'
},
include_error_analysis: {
type: 'boolean',
default: true,
description: 'Analyze workflow execution errors and failures'
},
include_deviation_detection: {
type: 'boolean',
default: true,
description: 'Detect deviations from expected execution patterns'
},
include_usage_patterns: {
type: 'boolean',
default: true,
description: 'Analyze workflow usage patterns and frequency'
},
include_optimization_recommendations: {
type: 'boolean',
default: true,
description: 'Generate optimization recommendations'
},
execution_status_filter: {
type: 'array',
items: {
type: 'string',
enum: ['completed', 'failed', 'cancelled', 'active', 'all']
},
default: ['all'],
description: 'Filter by workflow execution status'
},
min_execution_count: {
type: 'number',
default: 5,
description: 'Minimum execution count for analysis inclusion'
},
include_subflows: {
type: 'boolean',
default: true,
description: 'Include subflow analysis in the results'
},
performance_threshold_ms: {
type: 'number',
default: 30000,
description: 'Performance threshold in milliseconds for identifying slow executions'
},
generate_visual_reports: {
type: 'boolean',
default: true,
description: 'Generate visual workflow execution reports'
},
export_format: {
type: 'array',
items: {
type: 'string',
enum: ['json', 'csv', 'html_report', 'workflow_diagram', 'performance_chart']
},
default: ['json', 'html_report'],
description: 'Output formats for analysis results'
}
},
required: ['workflow_scope']
}
}, async (args) => await this.analyzeWorkflowExecution(args));
// Feature 13: Cross Table Process Discovery
this.registerTool({
name: 'snow_discover_cross_table_process',
description: 'Cross Table Process Discovery - Analyze and discover complex processes that span multiple ServiceNow tables and modules to identify hidden dependencies and optimization opportunities',
inputSchema: {
type: 'object',
properties: {
discovery_scope: {
type: 'string',
enum: ['full_instance', 'specific_modules', 'table_cluster', 'business_process', 'custom_scope'],
description: 'Scope of cross-table process discovery'
},
target_modules: {
type: 'array',
items: {
type: 'string',
enum: ['incident', 'change', 'problem', 'service_request', 'hr_case', 'asset', 'cmdb', 'project', 'procurement', 'finance', 'security', 'custom']
},
description: 'Target modules for analysis (required for specific_modules scope)'
},
starting_tables: {
type: 'array',
items: { type: 'string' },
description: 'Starting tables for process discovery (optional, will auto-detect if not provided)'
},
max_table_depth: {
type: 'number',
default: 5,
minimum: 2,
maximum: 10,
description: 'Maximum depth of table relationships to analyze'
},
min_process_instances: {
type: 'number',
default: 10,
minimum: 5,
description: 'Minimum number of process instances required to identify a pattern'
},
time_window: {
type: 'string',
enum: ['last_7_days', 'last_30_days', 'last_90_days', 'last_6_months', 'last_year', 'all_time'],
default: 'last_90_days',
description: 'Time window for process instance analysis'
},
include_custom_tables: {
type: 'boolean',
default: true,
description: 'Include custom tables in cross-table analysis'
},
relationship_types: {
type: 'array',
items: {
type: 'string',
enum: ['reference', 'extended', 'many_to_many', 'glide_list', 'related_list', 'workflow_transition']
},
default: ['reference', 'extended', 'related_list'],
description: 'Types of table relationships to analyze'
},
process_complexity_threshold: {
type: 'string',
enum: ['simple', 'moderate', 'complex', 'all'],
default: 'moderate',
description: 'Minimum process complexity to include in results'
},
include_data_flow_analysis: {
type: 'boolean',
default: true,
description: 'Include data flow patterns between tables'
},
include_user_journey_mapping: {
type: 'boolean',
default: true,
description: 'Map user journeys across different modules'
},
detect_automation_opportunities: {
type: 'boolean',
default: true,
description: 'Identify opportunities for process automation'
},
performance_analysis: {
type: 'boolean',
default: true,
description: 'Analyze cross-table query performance and optimization opportunities'
},
export_formats: {
type: 'array',
items: {
type: 'string',
enum: ['json', 'csv', 'html_report', 'process_diagram', 'dependency_map', 'optimization_plan']
},
default: ['json', 'html_report', 'process_diagram'],
description: 'Output formats for discovery results'
},
generate_migration_suggestions: {
type: 'boolean',
default: false,
description: 'Generate suggestions for process consolidation and migration'
}
},
required: ['discovery_scope']
}
}, async (args) => await this.discoverCrossTableProcess(args));
// Feature 14: Real Time Process Monitoring
this.registerTool({
name: 'snow_monitor_process',
description: 'Real Time Process Monitoring - Monitor active ServiceNow processes in real-time with live alerting, performance tracking, and automatic issue detection',
inputSchema: {
type: 'object',
properties: {
monitoring_scope: {
type: 'string',
enum: ['all_processes', 'specific_process', 'process_category', 'critical_processes', 'user_defined', 'performance_focused'],
description: 'Scope of real-time process monitoring'
},
process_identifiers: {
type: 'array',
items: { type: 'string' },
description: 'Specific process IDs or names to monitor (required for specific_process scope)'
},
process_categories: {
type: 'array',
items: {
type: 'string',
enum: ['incident_management', 'change_management', 'service_requests', 'problem_resolution', 'asset_lifecycle', 'hr_processes', 'approval_workflows', 'automation_flows']
},
description: 'Process categories to monitor (required for process_category scope)'
},
monitoring_duration_minutes: {
type: 'number',
default: 60,
minimum: 5,
maximum: 1440,
description: 'How long to monitor processes in minutes (5 minutes to 24 hours)'
},
refresh_interval_seconds: {
type: 'number',
default: 30,
minimum: 10,
maximum: 300,
description: 'How often to refresh monitoring data in seconds'
},
performance_thresholds: {
type: 'object',
properties: {
slow_execution_minutes: {
type: 'number',
default: 15,
description: 'Threshold for slow process execution alerts'
},
high_memory_usage_mb: {
type: 'number',
default: 100,
description: 'Memory usage threshold for alerts'
},
error_rate_percent: {
type: 'number',
default: 5,
description: 'Error rate threshold for alerts'
},
queue_depth_threshold: {
type: 'number',
default: 50,
description: 'Process queue depth threshold'
}
},
description: 'Performance thresholds for alerting'
},
alert_configuration: {
type: 'object',
properties: {
enable_alerts: {
type: 'boolean',
default: true,
description: 'Enable real-time alerts'
},
alert_channels: {
type: 'array',
items: {
type: 'string',
enum: ['console', 'email', 'webhook', 'servicenow_event', 'log_file']
},
default: ['console'],
description: 'Alert delivery channels'
},
severity_levels: {
type: 'array',
items: {
type: 'string',
enum: ['critical', 'high', 'medium', 'low', 'info']
},
default: ['critical', 'high', 'medium'],
description: 'Alert severity levels to monitor'
}
},
description: 'Alert configuration settings'
},
monitoring_features: {
type: 'object',
properties: {
track_performance_metrics: {
type: 'boolean',
default: true,
description: 'Track detailed performance metrics'
},
monitor_resource_usage: {
type: 'boolean',
default: true,
description: 'Monitor system resource usage'
},
detect_anomalies: {
type: 'boolean',
default: true,
description: 'Detect performance anomalies using ML'
},
track_user_activity: {
type: 'boolean',
default: false,
description: 'Monitor user activity patterns'
},
analyze_bottlenecks: {
type: 'boolean',
default: true,
description: 'Real-time bottleneck analysis'
},
predict_failures: {
type: 'boolean',