Skip to main content
Glama

load_primitives

Destructive

Registers built-in Xilinx or Yosys primitive models, or a trusted local Python loader, in the active session so agents can query post-elaboration connectivity and design structure.

Instructions

Register primitive models in the active session from either a built-in name (xilinx or yosys) or one local Python file defining load(db). Provide one source; name takes precedence when both are set. A custom file executes unsandboxed Python in the server process, so only use trusted code. Use load_liberty instead for standard-cell .lib files. Returns {"ok": true}.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "load_primitives"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoLocal Python file defining load(db); used only when name is omitted.
nameNoBuilt-in primitive set to register; when set, file is ignored.

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_primitivesOutput",
      +  "type": "object"
      +}
  2. Changed3 schema fields changedv0.1.9
    • addedInput schema / properties / file / description
      Added value: +"Local Python file defining load(db); used only when name is omitted."
    • changedInput schema / properties / name / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "xilinx",
      +      "yosys"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / name / description
      Added value: +"Built-in primitive set to register; when set, file is ignored."
  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 declare destructiveHint=true and readOnlyHint=false but say nothing about why; the description supplies the reason — a custom file 'executes unsandboxed Python in the server process, so only use trusted code.' That is exactly the context an agent needs to justify caution, plus it discloses the return payload {"ok": true}.

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?

Four short sentences, front-loaded with the core action before the precedence rule, the security warning, and the sibling pointer. Every sentence earns its place; only minor cost is restating precedence already in the schema.

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 two-optional-param registration tool with annotations and an output schema present, the description covers source selection, precedence, security implications, and sibling routing. Nothing an agent needs to invoke it safely 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% and the schema already documents both parameters, including the 'used only when name is omitted' and 'when set, file is ignored' precedence notes. The description restates that precedence and the load(db) contract rather than adding new syntax or format detail, so baseline 3 applies.

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 ('Register primitive models in the active session') and enumerates both source modes: a built-in name ('xilinx' or 'yosys') or a local Python file defining 'load(db)'. It also explicitly routes the .lib case to load_liberty, so an agent can distinguish it from that sibling without opening either 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 a concrete selection rule ('Provide one source; name takes precedence when both are set') and names the alternative tool with the condition that selects it ('Use load_liberty instead for standard-cell .lib files'). No inference about which tool to call is left to the agent.

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