arcas_onlineeda_upload_file
Upload electronic design files to an OnlineEDA project for verification, analysis, and FPGA workflows using the Arcas platform.
Instructions
Upload design files to OnlineEDA project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | No | ||
| filePath | No | ||
| fileType | No |
Implementation Reference
- src/tools/upload-file.ts:28-79 (handler)The protected async execute method implements the file upload logic: ensures login, navigates to project files page, uploads the local file via browser input, waits for success, returns result or error.protected async execute(params: UploadFileParams): Promise<ToolResult> { await this.ensureLoggedIn(); const page = this.browserManager.getPage(); if (!page) { return { success: false, error: 'Browser page not available', }; } try { // Verify file exists const absolutePath = resolve(params.filePath); await fs.access(absolutePath); // Navigate to project files page await page.goto(`https://onlineeda.arcas-da.com/projects/${params.projectId}/files`, { waitUntil: 'networkidle2' }); // Find file input element const fileInput = await page.$('input[type="file"]'); if (!fileInput) { return { success: false, error: 'File upload input not found on page', }; } // Upload file await fileInput.uploadFile(absolutePath); // Wait for upload to complete (adjust based on actual UI feedback) await page.waitForSelector('.upload-success, .file-uploaded', { timeout: 30000 }); return { success: true, data: { projectId: params.projectId, fileName: absolutePath.split('/').pop(), filePath: params.filePath, message: 'File uploaded successfully', }, }; } catch (error) { return { success: false, error: `File upload failed: ${error instanceof Error ? error.message : 'Unknown error'}`, }; } }
- src/tools/upload-file.ts:7-11 (schema)Zod schema defining input parameters: required projectId and filePath, optional fileType enum.const UploadFileSchema = z.object({ projectId: z.string().describe('Project ID to upload file to'), filePath: z.string().describe('Local file path to upload'), fileType: z.enum(['verilog', 'systemverilog', 'vhdl', 'constraints', 'other']).optional().describe('File type'), });
- src/index.ts:52-64 (registration)In setupTools method, UploadFileTool is instantiated with browserManager and added to the tools Map using its getName() as key for MCP tool registry.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); } }