UNPKG

@flexabrain/mcp-server

Version:

Advanced electrical schematic analysis MCP server with rail engineering expertise

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