Skip to main content
Glama

cad_simulate

Compile and run HDL testbenches with Icarus Verilog, Verilator, or GHDL to return build diagnostics, runtime logs, and a waveform artifact for debugging.

Instructions

Compile and run an HDL testbench, returning diagnostics and a waveform artifact.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "request": "<request>"
    },
    "name": "cad_simulate"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestYes

Output Schema

NameRequiredDescriptionDefault
okYes
jobYes
topNo
errorNo
engineYes
summaryNo
warningsNo
waveformNo
artifactsNo
exit_codeNo
timed_outNo
diagnosticsNo
stderr_tailNo
stdout_tailNo
finish_reasonNo
simulated_timeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=false with destructiveHint=false, so the agent knows this executes a build/run but is not destructive. The description adds that it compiles AND runs and returns diagnostics plus a waveform artifact, which explains why it is not read-only. It omits longer-running behavior, timeout handling (schema default 300s, max 7200s), and where artifacts are written.

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?

One sentence, front-loaded with the action and resource, and it closes with the useful return summary. Nothing is padding.

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

Completeness4/5

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

With an output schema present and annotations covering the safety profile, the description does not need to enumerate return fields. It conveys the two-part compile/run nature and that artifacts are produced, which is enough at a high level, though it does not mention supported engines or long-running behavior for a complex simulation tool.

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?

The description says nothing about the single 'request' parameter or its fields. Schema description coverage is nominally 0%, but the nested $defs are partly self-documenting (SourceSet has a description, and std, files, filelist, language and trace carry descriptions or enums), so the schema still does substantial work. The description adds no simulation-specific meaning such as engine choice or trace format implications.

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 states a specific verb and resource: 'Compile and run an HDL testbench.' That clearly separates it from synthesis (cad_synthesize) and checking (cad_check) siblings, which work on HDL but not by running a testbench. It stops short of naming a sibling alternative explicitly, so it sits just below the top band.

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?

There is no when-to-use guidance, no prerequisites (an existing project or source set), and no indication of when cad_verify or cad_check would be the better choice. An agent must infer from the name that this is the simulation step in the toolchain.

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