Skip to main content
Glama
NellyW8

EDA Tools MCP Server

by NellyW8

view_waveform

Open VCD waveform files in GTKWave viewer to analyze simulation results from electronic design projects.

Instructions

Open VCD waveform file in GTKWave viewer

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID from simulation (required)
vcd_fileNoVCD filename (default: output.vcd)output.vcd

Implementation Reference

  • Core implementation of the view_waveform tool in the EDAServer class. Validates project and VCD file existence, checks for GTKWave availability, and launches GTKWave to view the waveform.
    async viewWaveform(projectId: string, vcdFile = "output.vcd"): Promise<string> {
      try {
        // Check if project exists
        const project = this.projects.get(projectId);
        if (!project) {
          return JSON.stringify({
            success: false,
            error: `Project ${projectId} not found. Run a simulation first.`,
          }, null, 2);
        }
    
        const vcdPath = join(project.dir, vcdFile);
    
        // Check if VCD file exists
        try {
          await fs.access(vcdPath);
        } catch {
          // List available files to help user
          const files = await fs.readdir(project.dir);
          const vcdFiles = files.filter(f => f.endsWith('.vcd'));
          
          return JSON.stringify({
            success: false,
            error: `VCD file '${vcdFile}' not found in project ${projectId}`,
            available_vcd_files: vcdFiles,
            note: "Make sure your testbench includes $dumpfile() and $dumpvars() commands"
          }, null, 2);
        }
    
        // Check if GTKWave is available
        if (!(await commandExists('gtkwave'))) {
          return JSON.stringify({
            success: false,
            error: "GTKWave not found. Please install GTKWave to view waveforms.",
            install_instructions: {
              macos: "brew install gtkwave",
              linux: "sudo apt-get install gtkwave",
              windows: "Install GTKWave from http://gtkwave.sourceforge.net/"
            }
          }, null, 2);
        }
    
        // Launch GTKWave in background
        const gtkwaveCmd = `gtkwave "${vcdPath}" &`;
        await execAsync(gtkwaveCmd, { 
          cwd: project.dir, 
          timeout: 5000 
        });
    
        return JSON.stringify({
          success: true,
          message: `GTKWave launched for project ${projectId}`,
          vcd_file: vcdFile,
          vcd_path: vcdPath,
          project_type: project.type
        }, null, 2);
    
      } catch (error: any) {
        return JSON.stringify({
          success: false,
          error: error.message || String(error),
        }, null, 2);
      }
    }
  • src/index.ts:767-785 (registration)
    Registers the view_waveform tool with the MCP server in the listTools response, defining its name, description, and input schema.
    {
      name: "view_waveform",
      description: "Open VCD waveform file in GTKWave viewer",
      inputSchema: {
        type: "object",
        properties: {
          project_id: { 
            type: "string", 
            description: "Project ID from simulation (required)" 
          },
          vcd_file: { 
            type: "string", 
            description: "VCD filename (default: output.vcd)",
            default: "output.vcd"
          },
        },
        required: ["project_id"],
      },
    },
  • MCP tool call dispatcher for view_waveform that validates input parameters and invokes the EDAServer.viewWaveform method.
    case "view_waveform": {
      const projectId = validateRequiredString(args, "project_id", name);
      const vcdFile = getStringProperty(args, "vcd_file", "output.vcd");
      
      return {
        content: [{
          type: "text",
          text: await edaServer.viewWaveform(projectId, vcdFile),
        }],
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool opens a viewer (implying a UI action), but doesn't mention whether this launches an external application, requires GUI access, blocks execution, or has side effects. For a tool that likely interacts with external software, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function with zero wasted words. It's appropriately sized for a simple tool and front-loads the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (opening a waveform viewer), lack of annotations, and no output schema, the description is minimally adequate. It explains what the tool does but omits important behavioral context (e.g., how the viewer launches, what happens on success/failure). The schema covers parameters well, but overall completeness is limited.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents both parameters (project_id and vcd_file). The description adds no parameter-specific information beyond what's in the schema. This meets the baseline expectation when the schema does all the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Open') and the resource ('VCD waveform file in GTKWave viewer'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'view_gds' (which likely opens GDS files), but the specific file format (VCD) and viewer (GTKWave) provide inherent differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a simulation result), when not to use it, or how it relates to sibling tools like 'simulate_verilog' or 'view_gds'. The agent must infer usage from context alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NellyW8/mcp-EDA'

If you have feedback or need assistance with the MCP directory API, please join our Discord server