Skip to main content
Glama

add_component

Place a component from installed libraries into a circuit schematic, copying its library elements into the project and positioning all symbols on a 2.54 mm grid at the given coordinates.

Instructions

Add a component from the installed libraries to the circuit and place all its symbols (gates) on a schematic. Library elements are copied into the project library. Use add_device_to_board to put it on a PCB. Schematic grid is 2.54 mm.

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": {
      "project_path": "<project_path>",
      "device": "<device>",
      "x_mm": "<x_mm>",
      "y_mm": "<y_mm>"
    },
    "name": "add_component"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoDesignator; default: prefix + next number
x_mmYes
y_mmYes
valueNoValue text; default: library default (may contain {{ATTRIBUTE}} placeholders)
deviceYesLibrary device UUID (preferred) or exact device name, from search_components
schematicNoSchematic name, UUID or index; default: first
project_pathYesPath to the project's *.lpp file or its directory
rotation_degNoCounter-clockwise

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare non-readonly, non-idempotent, non-destructive, but the description adds genuinely new behavioral facts beyond them: library elements are copied into the project library (a lasting side effect) and every symbol/gate is instantiated on the schematic. It stops short of covering failure modes such as name collisions or what happens when the device is not in any installed library.

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?

Three short sentences: purpose first, the sibling alternative second, the coordinate constraint last. No restatement of the tool name or filler, and each sentence carries a distinct fact.

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?

For an 8-parameter mutating tool with no output schema, the description covers what it does, its persistent side effect, the sibling alternative, and the coordinate unit. It is slightly thin on what comes back (e.g. the assigned designator) and on error conditions, but annotations and a rich schema fill most remaining gaps.

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 75%, so the schema already documents most parameters (name, value, device, schematic, rotation_deg). The description's grid note (2.54 mm) does add unit/snapping context for x_mm and y_mm, which the schema leaves undescribed, but nothing is said about required-vs-default semantics or the project_path argument. Baseline 3 fits given the schema does most of the work.

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 (add a component from installed libraries), plus the concrete effect of placing all its symbol/gate instances on the schematic. It also distinguishes itself from add_device_to_board by naming the PCB-specific sibling, so an agent can tell the two apart 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 Guidelines4/5

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

Explicitly routes PCB placement to add_device_to_board, giving a clear alternative plus the condition that selects it. It lacks a stated 'when not to use' for the schematic case itself (e.g. moving an already-placed part via move_component/place_component), but the primary fork is unambiguous.

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