UNPKG

@flexabrain/mcp-server

Version:

Advanced electrical schematic analysis MCP server with rail engineering expertise

280 lines 10.8 kB
/** * FlexaBrain MCP Server - MCP Protocol Type Definitions * * Type definitions for MCP tool schemas and server responses */ // MCP Tool Definitions export const MCP_TOOLS = { ANALYZE_ELECTRICAL_SCHEMATIC: { name: 'analyze_electrical_schematic', description: 'Comprehensive analysis of electrical schematics with rail engineering expertise', inputSchema: { type: 'object', properties: { image_path: { type: 'string', description: 'Path to the electrical schematic image file' }, schematic_type: { type: 'string', enum: ['traction_power', 'signaling', 'control', 'auxiliary', 'power_distribution', 'general'], description: 'Type of electrical schematic being analyzed', default: 'general' }, analysis_depth: { type: 'string', enum: ['basic', 'standard', 'comprehensive'], description: 'Depth of analysis to perform', default: 'standard' }, focus_areas: { type: 'array', items: { type: 'string', enum: ['safety', 'compliance', 'performance', 'maintenance'] }, description: 'Specific areas to focus the analysis on' }, custom_standards: { type: 'array', items: { type: 'string' }, description: 'Additional standards to check compliance against' }, rail_system_context: { type: 'object', properties: { system_type: { type: 'string', enum: ['METRO', 'LIGHT_RAIL', 'HEAVY_RAIL', 'HIGH_SPEED', 'FREIGHT'] }, voltage_system: { type: 'string' }, region: { type: 'string' }, applicable_standards: { type: 'array', items: { type: 'string' } } }, description: 'Rail system context for specialized analysis' } }, required: ['image_path'] } }, EXTRACT_COMPONENT_INVENTORY: { name: 'extract_component_inventory', description: 'Extract and catalog all electrical components from schematic', inputSchema: { type: 'object', properties: { image_path: { type: 'string', description: 'Path to the electrical schematic image file' }, schematic_type: { type: 'string', description: 'Type of schematic for specialized component recognition' }, include_specifications: { type: 'boolean', description: 'Include detailed component specifications', default: true }, export_format: { type: 'string', enum: ['json', 'csv', 'excel'], description: 'Format for exported inventory', default: 'json' } }, required: ['image_path'] } }, VALIDATE_ELECTRICAL_STANDARDS: { name: 'validate_electrical_standards', description: 'Validate schematic compliance with electrical standards', inputSchema: { type: 'object', properties: { image_path: { type: 'string', description: 'Path to the electrical schematic image file' }, standards: { type: 'array', items: { type: 'string' }, description: 'Specific standards to validate against (IEC, IEEE, etc.)' }, region: { type: 'string', description: 'Regional standards context (US, EU, etc.)' }, rail_system_type: { type: 'string', description: 'Rail system type for specialized standards' }, generate_report: { type: 'boolean', description: 'Generate detailed compliance report', default: true } }, required: ['image_path'] } }, ANALYZE_POWER_FLOW: { name: 'analyze_power_flow', description: 'Analyze electrical power flow and distribution in schematic', inputSchema: { type: 'object', properties: { image_path: { type: 'string', description: 'Path to the electrical schematic image file' }, include_efficiency: { type: 'boolean', description: 'Include efficiency calculations', default: true }, calculate_losses: { type: 'boolean', description: 'Calculate power losses in the system', default: true }, optimization_suggestions: { type: 'boolean', description: 'Provide optimization recommendations', default: true } }, required: ['image_path'] } }, GENERATE_MAINTENANCE_SCHEDULE: { name: 'generate_maintenance_schedule', description: 'Generate maintenance schedule and recommendations', inputSchema: { type: 'object', properties: { image_path: { type: 'string', description: 'Path to the electrical schematic image file' }, system_age: { type: 'number', description: 'Age of the electrical system in years' }, last_maintenance: { type: 'string', description: 'Date of last maintenance (ISO 8601 format)' }, priority_focus: { type: 'string', enum: ['safety', 'reliability', 'cost', 'compliance'], description: 'Primary focus for maintenance prioritization', default: 'safety' } }, required: ['image_path'] } }, CHECK_SAFETY_COMPLIANCE: { name: 'check_safety_compliance', description: 'Comprehensive electrical safety analysis and compliance check', inputSchema: { type: 'object', properties: { image_path: { type: 'string', description: 'Path to the electrical schematic image file' }, include_arc_flash: { type: 'boolean', description: 'Include arc flash hazard analysis', default: true }, include_ground_fault: { type: 'boolean', description: 'Include ground fault protection analysis', default: true }, ppe_requirements: { type: 'boolean', description: 'Generate PPE requirements based on hazards', default: true } }, required: ['image_path'] } }, TRANSFORM_SCHEMATIC_IMAGE: { name: 'transform_schematic_image', description: 'Apply image transformations to improve schematic analysis', inputSchema: { type: 'object', properties: { image_path: { type: 'string', description: 'Path to the input schematic image' }, output_path: { type: 'string', description: 'Path for the output transformed image' }, operations: { type: 'array', items: { type: 'object', properties: { type: { type: 'string', enum: ['resize', 'crop', 'enhance', 'rotate', 'convert', 'denoise', 'sharpen'] }, params: { type: 'object', description: 'Parameters specific to the transformation type' } }, required: ['type', 'params'] }, description: 'List of transformations to apply in sequence' } }, required: ['image_path', 'output_path', 'operations'] } }, BATCH_ANALYZE_SCHEMATICS: { name: 'batch_analyze_schematics', description: 'Analyze multiple electrical schematics in batch with comparison', inputSchema: { type: 'object', properties: { image_paths: { type: 'array', items: { type: 'string' }, description: 'Array of paths to schematic image files' }, output_directory: { type: 'string', description: 'Directory to save analysis results' }, analysis_settings: { type: 'object', description: 'Common analysis settings for all schematics' }, generate_summary: { type: 'boolean', description: 'Generate summary report across all schematics', default: true }, comparison_analysis: { type: 'boolean', description: 'Perform comparison analysis between schematics', default: false } }, required: ['image_paths'] } } }; //# sourceMappingURL=mcp.js.map