Skip to main content
Glama
Copper

Copper

Edit PCB items

pcb_edit
Destructive

Apply low-level PCB edit operations as an all-or-nothing batch, including tracks, vias, text, deletes, moves, locks, and fields, then run DRC.

Instructions

Low-level PCB escape hatch — a batch of ops applied in one transaction (all or nothing), then DRC: {"op":"add_track","points":[[x,y],[x,y],...],"width":0.25,"layer":"F.Cu","net":"GND"} {"op":"add_via","at":[x,y],"net":"GND","size":0.6,"drill":0.3} (or "points":[[x,y],...]) {"op":"delete","refs":["R7"]} | {"uuids":[...]} | {"nets":["SDA"]} (tracks+vias of those nets) | {"all_tracks":true} | {"zone_nets":["GND"]} {"op":"add_text","text":"v1.0","at":[x,y],"layer":"F.SilkS","size":1.0,"rot":0} {"op":"set_field","ref":"U1","field":"LCSC","value":"C12345","visible":false} {"op":"move","ref":"R1","x":110,"y":105,"rot":90,"side":"top"} (locked part: add "unlock":true) {"op":"lock"|"unlock","refs":["J1"]} (or "all":true) Coordinates are mm (board coordinates as in pcb_read; track/via uuids from pcb_read(what=["tracks"])). Deleting a footprint that is in the schematic only lasts until the next pcb_sync — delete the symbol instead. Prefer pcb_place / pcb_route / pcb_pour when they fit.

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": {
      "ops": "<ops>"
    },
    "name": "pcb_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
opsYes
renderNoattach a PNG (default false)
projectNoproject path (default: active)
while_openNorefuse (default) | revert

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and openWorldHint=false, and the description adds substantial context beyond that: the all-or-nothing transaction semantics, that DRC runs afterward, that locked parts require an explicit "unlock":true, and the pcb_sync interaction on footprint deletion. It also clarifies coordinate units (mm, board coordinates as in pcb_read) and where track/via uuids come from.

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 and transaction semantics before the op catalog, and the example block is dense but necessary given the free-form `ops` schema. The nested formatting of the delete variants is slightly sprawling, but no sentence is filler.

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 a destructive batch-mutation tool with no output schema, the definition covers the critical unknowns: transaction atomicity, DRC running afterward, coordinate conventions, and the schematic-sync hazard. It stops short of saying what the agent receives back (e.g. DRC violation report shape or how failures surface), which is the one remaining gap.

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

Parameters5/5

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

The schema types `ops` only as an array of generic objects, so the description carries the entire burden of explaining the payload — and it does so with concrete JSON examples for every op (add_track, add_via, delete with four selector variants, add_text, set_field, move, lock/unlock). This is meaning the schema cannot provide at all; the remaining 75%-covered params (render, while_open, project) are already documented in the schema.

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?

The description opens with a specific framing — 'Low-level PCB escape hatch' — and defines the mechanism precisely: a batch of ops applied in one transaction, then DRC. It distinguishes itself from siblings by naming pcb_place / pcb_route / pcb_pour as the preferred higher-level tools, so an agent can tell what this tool is for without opening the 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?

Explicit routing guidance is given: 'Prefer pcb_place / pcb_route / pcb_pour when they fit,' establishing this as the fallback for cases those tools don't cover. It also gives a concrete when-not caveat — deleting a schematic-backed footprint only lasts until the next pcb_sync, so delete the symbol instead — which is exactly the kind of trap an agent needs warned about.

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