Skip to main content
Glama

load_vhdl

Loads VHDL files into the active session to elaborate the design, so you can query hierarchy, connectivity, cards and source references instead of reading RTL files.

Instructions

Load VHDL into the active session (beta, restricted two-state RTL subset). Prefer passing every file of the design as one list (any order; units are resolved across files). Single-file calls still work: load package files first, then the top. Package-only files or entities awaiting generics may return top=null. Use hierarchy, cards and connectivity queries on the elaborated design. Use get_source for entity, port, signal, instance and process source references. intent=True enables get_intent for enum literals, record fields, generics and symbolic ranges. Unsupported constructs may fail during beta development. Returns the top summary when elaborated, language and beta status.

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": {
      "file": "<file>"
    },
    "name": "load_vhdl"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoTop entity name; omit to infer the top.
fileYesA local VHDL source path (.vhd/.vhdl), or a list of paths loaded as one batch in any order.
intentNoRetain VHDL source intent for get_intent; the last load_vhdl call decides whether it stays live.
libraryNoVHDL library the files compile into, for designs that name it, as in `library neorv32;`. Omit for designs that use `work`.

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_vhdlOutput",
      +  "type": "object"
      +}
  2. Changed2 schema fields changedv0.1.23
    • addedInput schema / properties / intent
      Added value: +{
      +  "default": false,
      +  "description": "Retain VHDL source intent for get_intent; the last load_vhdl call decides whether it stays live.",
      +  "title": "Intent",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / library
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "VHDL library the files compile into, for designs that name it, as in `library neorv32;`. Omit for designs that use `work`.",
      +  "title": "Library"
      +}
  3. Changed3 schema fields changed
    • addedInput schema / properties / file / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / file / description
      Previous value: -"One local VHDL source file path (.vhd or .vhdl)."New value: +"A local VHDL source path (.vhd/.vhdl), or a list of paths loaded as one batch in any order."
    • removedInput schema / properties / file / type
      Removed value: -"string"
  4. Addedv0.1.9

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, idempotentHint=false and destructiveHint=false; the description goes beyond them by disclosing beta failure modes ("unsupported constructs may fail"), the top=null outcome for package-only files or entities awaiting generics, and the returned top summary. It stops short of saying whether a load replaces or merges with a previously loaded design, which matters for a state-mutating tool.

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?

The core instruction (prefer one batched list) is front-loaded and every sentence carries operational content. It is dense with parenthetical caveats and runs several lines, but none of it is filler.

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 mutating loader with four parameters and an output schema, the description covers the supported subset, batch vs. single-file strategy, expected null-top cases, beta failure risk, and which sibling tools to use afterward. 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.

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds real semantics: batch loading resolves units across files regardless of order, package files should precede the top in single-file calls, and intent=True is what keeps get_intent live. The `library` parameter is left entirely to the schema, which keeps it from a 5.

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 VHDL into the active session") plus the scope of the supported subset (beta, two-state RTL). The mention of VHDL plus follow-up tools (hierarchy, cards, connectivity, get_source, get_intent) makes it clearly distinguishable from load_verilog, load_systemverilog, load_liberty and load_primitives.

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 preferred usage ("pass every file of the design as one list, any order") and an explicit fallback with ordering rules for single-file calls (packages first, then top). It also routes the agent onward: elaboration queries vs. get_source for source references, and intent=True as the precondition for get_intent.

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