Skip to main content
Glama

load_verilog

Load local gate-level or structural Verilog into the active session. First call load_liberty for Liberty cells or load_primitives for built-ins; use load_systemverilog instead for RTL elaboration.

Instructions

Load local gate-level or structural Verilog into the active session. First call load_liberty for Liberty cells or load_primitives for built-ins; use load_systemverilog instead for RTL elaboration. Unknown modules fail unless allow_unknown_designs is true. get_source shows the netlist declaration of an object; for Yosys output, yosys_source_attributes=True also records its RTL origins (get_source origin=N). get_intent cannot answer for netlists.

Input Schema

NameRequiredDescriptionDefault
filesYesOne or more local structural Verilog netlist paths.
keep_assignsNoPreserve continuous assignments as explicit objects.
allow_unknown_designsNoBlack-box unresolved cell/module definitions instead of failing.
yosys_source_attributesNoDecode Yosys `(* src = ... *)` attributes into source origins pointing back to the RTL.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / yosys_source_attributes
      Added value: +{
      +  "default": false,
      +  "description": "Decode Yosys `(* src = ... *)` attributes into source origins pointing back to the RTL.",
      +  "title": "Yosys Source Attributes",
      +  "type": "boolean"
      +}
  2. Changed3 schema fields changedv0.1.9
    • addedInput schema / properties / allow_unknown_designs / description
      Added value: +"Black-box unresolved cell/module definitions instead of failing."
    • addedInput schema / properties / files / description
      Added value: +"One or more local structural Verilog netlist paths."
    • addedInput schema / properties / keep_assigns / description
      Added value: +"Preserve continuous assignments as explicit objects."
  3. First observedv0.1.8

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare the safety profile (readOnlyHint=false, idempotent=false, openWorld=false, destructive=false). The description adds substantive behavior beyond them: unresolved modules fail unless allow_unknown_designs is true, and yosys_source_attributes records RTL origins consumable via get_source. It also flags a downstream limitation (get_intent cannot answer for netlists), which is genuinely non-obvious.

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

Conciseness4/5

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

Purpose is front-loaded and each sentence is dense and useful, but the trailing sentences about get_source and get_intent drift into describing sibling tools' behavior, which is slightly more than this tool's own contract requires. Still lean overall.

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

Completeness5/5

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

For a load tool with no output schema and high-complexity session side effects, the description covers prerequisites, alternatives, failure semantics, and downstream tool interactions. Nothing an agent needs to call it correctly is missing.

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 coverage is 100%, so the baseline is 3. The description restates the effect of allow_unknown_designs and yosys_source_attributes that the schema already documents, adding only the get_source origin=N usage detail, which is marginal incremental value over the structured fields.

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

Purpose5/5

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

States a specific verb (Load), resource (gate-level/structural Verilog), and target (active session), and explicitly distinguishes itself from load_systemverilog ('for RTL elaboration'), load_liberty, and load_primitives. An agent can route correctly without opening any schema.

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

Usage Guidelines5/5

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

Gives explicit ordering prerequisites ('First call load_liberty... or load_primitives') and names the alternative for the RTL case ('use load_systemverilog instead'). When-to-use and when-not-to-use are both covered with named siblings.

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