Skip to main content
Glama

load_verilog

Load local gate-level or structural Verilog netlists into the active session to query post-elaboration connectivity. Load Liberty cells or primitives first so modules resolve.

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.

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": {
      "files": "<files>"
    },
    "name": "load_verilog"
  }
}

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.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.25
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "result": {
      +      "additionalProperties": true,
      +      "title": "Result",
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "title": "load_verilogOutput",
      +  "type": "object"
      +}
  2. 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"
      +}
  3. 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."
  4. First observedv0.1.8

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false); the description goes well beyond that by disclosing the failure mode ('Unknown modules fail unless allow_unknown_designs is true') and the downstream query consequences (get_source netlist declarations, Yosys origins via get_source origin=N). It also makes clear this mutates the active session by loading content into it, consistent with readOnlyHint=false.

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?

Front-loaded with the core action, then prerequisites, alternatives, failure behavior, and query implications in a tight sequence with no filler. The get_source/yosys_source_attributes sentence is slightly dense and compresses two ideas, but nothing is redundant.

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 state-mutating load tool with four parameters, an output schema, and full annotation coverage, the description supplies everything an agent needs: prerequisites, sibling routing, error behavior, and how loaded data can later be inspected. Return values are correctly left to the output schema.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3; the description still adds meaning by explaining the concrete consequence of allow_unknown_designs (fail vs. black-box) and the downstream effect of yosys_source_attributes (records RTL origins queryable via get_source origin=N). It leaves keep_assigns to the schema, which already documents it adequately.

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 and resource ('Load local gate-level or structural Verilog into the active session') and immediately scopes it against the sibling that handles the other case ('use load_systemverilog instead for RTL elaboration'). An agent can distinguish this from load_systemverilog and load_liberty 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 for Liberty cells or load_primitives for built-ins'), an explicit alternative with its selecting condition (load_systemverilog for RTL), and a downstream limitation (get_intent cannot answer for netlists). Both when-to-use and when-not-to-use are covered.

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