arcas_onlineeda_natural_language
Process natural language queries to perform electronic design automation operations like formal verification, equivalence checking, and FPGA design analysis.
Instructions
Process natural language queries for Arcas OnlineEDA operations with extensive examples
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| context | No |
Implementation Reference
- src/tools/natural-language.ts:143-195 (handler)The core handler function that processes natural language input, matches against examples, detects intent, and returns suggested tools and parameters.protected async execute(params: NaturalLanguageParams): Promise<ToolResult> { const query = params.query.toLowerCase(); try { // First check for exact or close matches in examples const exactMatch = this.findBestExample(query); if (exactMatch) { return { success: true, data: { interpretation: exactMatch.interpretation, suggestedTool: exactMatch.tool, suggestedParams: exactMatch.params, matchedExample: exactMatch.query, confidence: 'high', }, }; } // Parse intent from natural language with enhanced understanding if (this.isProjectCreation(query)) { return this.suggestProjectCreation(query); } if (this.isVerification(query)) { return this.suggestVerification(query); } if (this.isFileOperation(query)) { return this.suggestFileUpload(query); } if (this.isNavigation(query)) { return this.suggestNavigation(query); } if (this.isResultsQuery(query)) { return this.suggestGetResults(params.context?.currentProject); } if (this.isHelpQuery(query)) { return this.provideEnhancedHelp(); } // Fallback with examples return this.provideFallbackWithExamples(params.query); } catch (error) { return { success: false, error: `Natural language processing failed: ${error instanceof Error ? error.message : 'Unknown error'}`, }; } }
- src/tools/natural-language.ts:5-11 (schema)Zod schema defining the input parameters for the natural language tool.const NaturalLanguageSchema = z.object({ query: z.string().describe('Natural language query about Arcas OnlineEDA operations'), context: z.object({ currentProject: z.string().optional().describe('Current project ID'), previousResults: z.any().optional().describe('Previous operation results'), }).optional(), });
- src/index.ts:52-64 (registration)Registration of the NaturalLanguageTool instance in the MCP server's tools map, along with other tools.private setupTools(): void { const toolInstances = [ new NavigateTool(this.browserManager), new ProjectTool(this.browserManager), new UploadFileTool(this.browserManager), new RunVerificationTool(this.browserManager), new NaturalLanguageTool(this.browserManager), ]; for (const tool of toolInstances) { this.tools.set(tool.getName(), tool); } }
- src/tools/natural-language.ts:23-129 (helper)Extensive list of example queries and their corresponding tool mappings used for intent matching and suggestion.private examples: Example[] = [ // Project creation examples { query: "I want to create a new formal verification project for my CPU design", interpretation: "Create formal verification project", tool: "arcas_onlineeda_project", params: { action: "create", projectType: "formal", projectName: "cpu_formal_verification" } }, { query: "Let's start a power analysis project for the GPU controller", interpretation: "Create power analysis project", tool: "arcas_onlineeda_project", params: { action: "create", projectType: "power", projectName: "gpu_controller_power" } }, { query: "Set up equivalence checking between RTL and gate-level netlist", interpretation: "Create equivalence checking project", tool: "arcas_onlineeda_project", params: { action: "create", projectType: "equivalence", projectName: "rtl_gate_equivalence" } }, // Verification examples { query: "Check if my RISC-V core meets all safety properties", interpretation: "Run formal verification with safety properties", tool: "arcas_onlineeda_run_verification", params: { verificationType: "formal", options: { properties: ["safety"], depth: 20 } } }, { query: "Verify that the optimized design is functionally equivalent to the original", interpretation: "Run equivalence verification", tool: "arcas_onlineeda_run_verification", params: { verificationType: "equivalence" } }, { query: "Analyze power consumption during different operating modes", interpretation: "Run power analysis verification", tool: "arcas_onlineeda_run_verification", params: { verificationType: "power", options: { timeout: 600 } } }, { query: "Find security vulnerabilities in my crypto module", interpretation: "Run security verification", tool: "arcas_onlineeda_run_verification", params: { verificationType: "security", options: { properties: ["information_leakage", "timing_attacks"] } } }, // File operations examples { query: "Upload my Verilog files for the memory controller", interpretation: "Upload Verilog design files", tool: "arcas_onlineeda_upload_file", params: { fileType: "verilog" } }, { query: "Add the SystemVerilog testbench to the project", interpretation: "Upload SystemVerilog testbench", tool: "arcas_onlineeda_upload_file", params: { fileType: "systemverilog" } }, { query: "Import SDC timing constraints", interpretation: "Upload constraint files", tool: "arcas_onlineeda_upload_file", params: { fileType: "constraints" } }, // Navigation examples { query: "Show me all my verification projects", interpretation: "Navigate to projects list", tool: "arcas_onlineeda_navigate", params: { action: "projects" } }, { query: "Go to the documentation", interpretation: "Navigate to documentation", tool: "arcas_onlineeda_navigate", params: { action: "documentation" } }, // Complex workflow examples { query: "I need to verify my AES encryption module meets FIPS standards", interpretation: "Security verification workflow for cryptographic module", tool: "workflow", params: { steps: [ { tool: "arcas_onlineeda_project", params: { action: "create", projectType: "security", projectName: "aes_fips_verification" } }, { tool: "arcas_onlineeda_upload_file", params: { fileType: "verilog" } }, { tool: "arcas_onlineeda_run_verification", params: { verificationType: "security", options: { properties: ["fips_compliance"] } } } ] } }, { query: "Compare power consumption before and after optimization", interpretation: "Power comparison workflow", tool: "workflow", params: { steps: [ { tool: "arcas_onlineeda_project", params: { action: "create", projectType: "power", projectName: "optimization_comparison" } }, { tool: "arcas_onlineeda_upload_file", params: { fileType: "verilog", note: "Upload both versions" } }, { tool: "arcas_onlineeda_run_verification", params: { verificationType: "power" } } ] } } ];
- src/index.ts:20-20 (registration)Import statement for the NaturalLanguageTool class.import { NaturalLanguageTool } from './tools/natural-language.js';