Skip to main content
Glama

design_add_part

Add a single part to a design plan and wire its pins to named nets in one call, creating or merging nets automatically from a pin-to-net map.

Instructions

Add one part and wire its pins to named nets, in one call.

The atomic authoring primitive under the block/bus tools: place a single arbitrary part -- an MCU, a connector, a regulator -- and fold each pin into a net. connections is a pin->net map, the shape a datasheet pinout reads in; pins that map to the same net (an IC's five VCC pins) merge onto one net automatically, so you never hand-maintain a net's pin list. Chain with design_add_circuit_block (peripherals) and design_connect_bus (wide interfaces) to author a whole netlist without writing raw net JSON.

Naming-agnostic: you supply the part identity and net names chosen from the live inventory; this owns only the pin->net folding.

Args: plan_json: the DesignPlan as a JSON string or dict. refdes: the new part's designator (must be free in the plan). lib_ref: its library symbol name. connections: {pin: net_name} -- a net is created if absent or merged into if present. value / footprint / lib_path / sheet / manufacturer / mpn / datasheet_url / role: standard Part fields. power_nets / ground_nets: net names to flag power / ground when this call creates them (an existing net keeps its flags). net_roles: {net_name: role} for nets created here.

Returns: {ok, plan, added: {refdes, nets, extended_nets}, notes, validation} -- same shape as design_add_circuit_block. ok is False on a duplicate refdes / empty connections / schema error.

Input Schema

NameRequiredDescriptionDefault
mpnNo
roleNo
sheetNomain
valueNo
refdesYes
lib_refYes
lib_pathNo
footprintNo
net_rolesNo
plan_jsonYes
power_netsNo
connectionsYes
ground_netsNo
manufacturerNo
datasheet_urlNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations present, the description carries the burden well: it discloses that pins mapping to the same net merge automatically, that a net is created if absent and existing nets keep their power/ground flags, and that ok is False on duplicate refdes / empty connections / schema error. It never says whether plan_json is mutated in place or only returned in the response, which is a meaningful gap for a state-changing call.

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 one-line purpose, then scope, then chaining, then args and returns. Every paragraph earns its place, though the docstring-style 'Args:'/'Returns:' scaffolding and reST double-backticks are slightly heavier than needed for an agent-facing description.

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 15-parameter, nested-object, no-annotation mutation tool this covers what an agent needs: what it does, how it composes with siblings, the connection-map semantics, the failure conditions, and the return shape. The output schema exists and the description still names the keys and the ok=False causes, which is the right level of redundancy.

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 0%, so the description must compensate, and it does: all 15 parameters are addressed, with special attention on the non-obvious ones (connections as a pin->net map, power_nets/ground_nets only flagging nets created by this call, net_roles scoped to nets created here). The bundled 'value / footprint / lib_path / sheet / manufacturer / mpn / datasheet_url / role' sentence merely labels eight fields as 'standard Part fields' without explaining any of them, which is the main shortfall.

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+resource+scope: 'Add one part and wire its pins to named nets, in one call.' It explicitly positions itself as 'the atomic authoring primitive under the block/bus tools', which separates it from design_add_circuit_block and design_connect_bus, both named in the text.

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?

Gives clear usage context ('place a single arbitrary part -- an MCU, a connector, a regulator') and explicitly names the two recurring alternatives it chains with, plus the 'naming-agnostic' constraint that the caller must supply inventory-chosen names. It stops short of stating when NOT to use it in favor of the block/bus tools, but the chaining guidance makes the division of labor clear.

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

Deploy Server

Other Tools