Skip to main content
Glama

Board setup: design rules, layers, copper, net classes

pcb_rules

Read and modify PCB design rules and board setup, including clearances, track widths, via sizes, copper layers, net classes, and differential pairs for DRC-ready layout.

Instructions

Design rules and board setup for any board type (all sizes in mm). action "read": summary of the active rules (clearances, track widths, via sizes, plane/pour connection, mask expansion), layers and net classes. action "set": clearance (copper↔copper), pourClearance, boardEdgeClearance, holeToHole, track {min,default,max}, via {diameter,hole,minDiameter,minHole}, copperWeight "1oz"|"2oz", padConnection "thermal"|"direct" (+ spokeWidth, spokeClearance), solderMaskExpansion. action "patch": raw edits [{path:"Physics/Via Size/viaSize/form/viaOuterdiameterDefault", value}] on the rule JSON. action "layers": copper layer count (2/4/6…). action "layer_modify": layer (id or name), name, type SIGNAL|PLANE (inner layers), color. action "net_class": name + nets. action "diff_pair": name, positive, negative.

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": {
      "action": "<action>"
    },
    "name": "pcb_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
viaNo
nameNo
netsNo
typeNo
colorNo
editsNo
layerNo
trackNo
actionYes
layersNo
negativeNo
positiveNo
clearanceNo
holeToHoleNo
spokeWidthNo
copperWeightNo
padConnectionNo
pourClearanceNocopper pour/plane to other objects
spokeClearanceNo
boardEdgeClearanceNo
solderMaskExpansionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden and does signal mutability by separating 'set' (named fields) from 'patch' (raw JSON path edits, with an example path), which helps the agent understand blast radius. It never states whether changes persist immediately, whether they are validated, whether they are reversible, or that a snapshot should precede destructive edits.

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?

A single front-loaded block organized by action, with terse field enumerations and no filler sentences. The telegraphic quoting style ('copperWeight "1oz"|"2oz"') is dense but still scannable for a 21-parameter tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a seven-action, 21-parameter mutation tool with no annotations and no output schema, the description covers inputs well but leaves the operational picture thin: read's return shape is only a phrase, and nothing explains error handling, persistence, or coordination with pcb_sync/pcb_snapshot.

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 description coverage is 5% across 21 parameters, so the description must compensate and largely does: it labels clearance as copper↔copper, explains pourClearance, boardEdgeClearance, holeToHole, nestles track/via sub-fields, and ties layer/name/type/color/nets/positive/negative to their actions. Remaining gaps are small but real — no per-field defaults, ranges, or units beyond the global mm note.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The title and description state a concrete domain (design rules, layers, copper, net classes) and enumerate all seven actions with the fields each operates on, so the agent can map intent to action. It does not, however, distinguish this tool from siblings such as pcb_read or pcb_copper, which read or touch adjacent board state.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Guidance is only implicit: the action list shows which operation to pick for each job (read rules vs. set fields vs. raw patch), and 'all sizes in mm' fixes units. There is no explicit when-to-use/when-not, no mention of prerequisites, and no routing to alternatives like pcb_drc for validation or pcb_snapshot before mutating.

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